Reputation: 13
I am trying to test perl scripts through localhost. I configured apache to allow perl scripts to be run from /usr/lib/cgi-bin (or so I thought). Whenever I go to localhost/cgi-bin/script.pl I get a 403 Forbidden error. Here is my apache conf file.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/cgtopher/public_html/
<Directory /home/cgtopher/public_html/>
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#cgi-bin
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI FollowSymLinks
Order allow,deny
Require all granted
</Directory>
ErrorLog /home/cgtopher/.apache/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
In my error log I keep getting this:
[Sat Sep 05 10:30:12.565510 2015] [access_compat:error] [pid 10918] [client 127.0.0.1:60699] AH01797: client denied by server configuration: /usr/lib/cgi-bin/hello.pl
Upvotes: 1
Views: 2233
Reputation: 283
You have Order allow,deny
, which will reject the request unless at least one Allow directive passes.
You have no Allow directive (except for Directory /home/cgtopher/public_html/, which does not cover the cgi-bin directory).
(Add Allow from all
to the cgi-bin directory?)
Upvotes: 2