Forum Moderators: phranque
I'm trying for a couple of hours now to set up apache/python cgi on my ubuntu development machine.. Though, whenever i go to the cgi file, it give me a 403 Forbidden page.. Exactly as follows:
Forbidden
You don't have permission to access /www/test.cgi on this server.
Apache/2.0.54 (Ubuntu) mod_python/3.1.3 Python/2.4.2 PHP/5.0.5-2ubuntu1.1 Server at localhost Port 80
My httpd.conf file is as follows(noting that /var/www/ is the folder where the root www folder resides):
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
AddHandler cgi-script .cgi .py .pl
<Directory /var/www>
Options +ExecCGI
AddHandler cgi-script .cgi .py .pl
</Directory>
Also, i have chmod all file permission to 777..
The content of the cgi is the most basic testing script and should not have any problems, is as follows:
#!/usr/bin/python
# Required header that tells the browser how to render the text.
print "Content-Type: text/plain\n\n"
# Print a simple message to the display window.
print "Hello, World!\n"
Anyone know what am i doing wrong?
Thanks alot!
Are there any other access controls in httpd.conf or .htaccess that would prevent direct HTTP requests to /cgi-bin? (it would be normal to have such access controls to prevent direct Web requests of your scripts, but they'd need to be disabled for this kind of testing by direct-requesting the script).
Jim