Running CGI With Perl under Apache Permission Problem
- by neversaint
I have the following entry under apache2.conf in my Debian box.
AddHandler cgi-script .cgi .pl
Options +ExecCGI
ScriptAlias /cgi-bin/ /var/www/mychosendir/cgi-bin/
Then I have a perl cgi script stored under these directories and permissions:
nvs@somename:/var/www/mychosendir$ ls -lhR
.:
total 12K
drwxr-xr-x 2 nvs nvs 4.0K 2010-04-21 13:42 cgi-bin
./cgi-bin:
total 4.0K
-rwxr-xr-x 1 nvs nvs 90 2010-04-21 13:40 test.cgi
However when I tried to access it in the web browser:
http://myhost.com/mychosendir/cgi-bin/test.cgi
They gave me this error:
Forbidden
You don't have permission to access /mychosendir/cgi-bin/test.cgi on this server.
What's wrong with it?
Update:
I also have the following entry in my apache2.conf:
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>