Ubuntu – accessing /cgi-bin/ throws 403 forbidden

apache-2.2scriptaliasUbuntu

 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/         <Directory "/usr/lib/cgi-bin">                 AllowOverride None                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                 Order allow,deny                 Allow from all         </Directory>

so i have a new virtual host set up @ /var/www2

i can access everything fine.

except when i navigate to /cgi-bin/

it throws 403 error.

Best Answer

There could be 2 things going on here. If you are going to yourdomain/cgi-bin/ with nothing else after it, and have directory indexes turned off that is exactly what is supposed to happen without an index.html in the path. It can't show an index, because it doesn't exist, and you don't have permission to browse the contents.

If you are trying to hit a script directly yourdomain/cgi-bin/script.pl and you are getting it, you need to add the execute bit on the scripts in there, and make sure the permissions are set so that the webserver can execute them.

Related Topic