Running CGI With Perl under Apache Permission Problem
Posted
by neversaint
on Server Fault
See other posts from Server Fault
or by neversaint
Published on 2010-04-21T06:09:50Z
Indexed on
2010/04/21
6:13 UTC
Read the original article
Hit count: 526
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>
© Server Fault or respective owner