im new to cgi scripting...im using python...and ubuntu...
i changed apache2's default file to set the cgi directory to /var/www/cgi-bin...and there i i uploaded my simple cgi file...the cgi file runs perfectly fine when run through terminal...which means there is no error...but when i try to access it through a web browser i get "You don't have permission to access /cgi-bin/ on this server."
/var/www is my localost directory...and i pass http://localhost/cgi-bin/index.cgi as the address...
i have also checked my permissions ... they're all fine...
every file is readable as well as executable by all users...

#!/usr/bin/env python
print """Content-type: text/html
<H1>A Third CGI script</H1>
<P>Hello, CGI World!</P>
<table border=1>
for i in range(5):
    print "<tr>"
    for j in range(4):
        print "<td>%d.%d</td>" % (i, j)
    print "</tr>"
print """

can you please temme where im going wrong...

6 Years
Discussion Span
Last Post by richieking

folder permission is 777 ( for cgi-bin ) and file permissiong is 755
i set these permissions for testing...
they didnt work .. !



You don't have permission to access /cgi-bin/ on this server.

Apache/2.2.14 (Ubuntu) Server at localhost Port 80


Are you sure the cgi diractory is configured well?
what is the owner and user group,...?

1.Its apache the owner of this directory??
2. Can you access a different cgi script from the dir.
3. Have you configured apahce conf well?

Edited by richieking: n/a

This article has been dead for over six months. Start a new discussion instead.
Please be thoughtful and detailed and be sure to adhere to our posting rules.