Apache Run Python Script - Control WebPanel Wiki PDF
Apache Run Python Script - Control WebPanel Wiki PDF
Install python
python -V
1 3rdParty
cd /home/USERNAME/public_html
19 Apache
mkdir cgi-bin
1 API
nano cgi-bin/test.py
1 Backups
3 Clusters
Now add the following python test script in the le:
5 Development
/home/USERNAME/public_html/cgi-bin/test.py
7 DNS
14 E-Mail
https://wiki.centos-webpanel.com/apache-run-python-script 1/4
18/10/2019 Apache run python script - Control WebPanel Wiki
7 FTP
#!/usr/bin/python
2 License
# enable debugging
import cgitb 2 Load-Balancers
cgitb.enable() 4 Migrations
print "Content-Type: text/plain\r\n\r\n"
9 MySQL
print
print "Hello World!" 1 Nginx
14 Other
3 Other Databases
Update test.py le and folder cgi-bin permissions
11 PHP
2 Scripts
chown -R USERNAME.USERNAME /home/USERNAME/public_
23 Security
html/cgi-bin
chmod +x /home/USERNAME/public_html/cgi-bin/test. 1 shell-scripts
py 2 SSL/AutoSSL
2 Testing
Popular Articles
Options +ExecCGI
AddHandler cgi-script .py How to change ssh
port
How to install
<IfModule cgid_module>
Import / Export
<Directory /home/*/public_html/cgi-bin/> MySQL Database
Options ExecCGI SymLinksifOwnerMatch
SetHandler cgi-script
AddHandler cgi-script .cgi .pl .py Latest Articles
Require all granted
AllowOverride All How to disable
php/php-fpm
selector
https://wiki.centos-webpanel.com/apache-run-python-script 2/4
18/10/2019 Apache run python script - Control WebPanel Wiki
If module is loaded, you should get output containing this: Join Our Marketing Team
suexec_module (shared)
Join Our Designers Team
http://wiki.centos-webpanel.com/how-to-enable-
mod_suexec-with-apache Join Our Documentation
Team
http://domain.com/cgi-bin/test.py
Related Articles
https://wiki.centos-webpanel.com/apache-run-python-script 3/4
18/10/2019 Apache run python script - Control WebPanel Wiki
on Apache allowed
Home / FAQ / Main Website / Forum / Facebook / YouTube © Copyright, CWP Wiki
https://wiki.centos-webpanel.com/apache-run-python-script 4/4