Ask Your Question
0

How to configure apache server for python web development

asked 2017-02-09 14:09:53 -0500

How to show dynamic content with . Py file or . Cgi file using python script And how to configure apache server in fadora If xampp is required i have already install it but don't work Please help....

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-03 07:55:53 -0500

Hello, if you put script in /var/www/cgi-bin/ apache is already configured to execute them. As example, this works in my Fedora 25:

[root@linux01 cgi-bin]# pwd;ls -l test.py;cat test.py
/var/www/cgi-bin
-rwx---r-x. 1 root root 242  3 mar 14.44 test.py
#!/usr/bin/env python
print "Content-type: text/html\n\n"
print "<html>\n<body>"
print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">"
print "Python Script Test Page"
print "</div>\n</body>\n</html>"
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-09 14:09:53 -0500

Seen: 230 times

Last updated: Feb 09 '17