Ask Your Question

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

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;cat
-rwx---r-x. 1 root root 242  3 mar 14.44
#!/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

Question Tools

1 follower


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

Seen: 239 times

Last updated: Feb 09 '17