Apache 403 error

From Noah.org
Jump to: navigation, search


Problem: you try to connect to a given page in your web server and you get an HTTP 403 error. In your Apache error log you see a message something like this:

[error] client denied by server configuration: /opt/my_package/cgi-bin/

Note that the path in the error.log is the filesystem directory path, not the URL.

This often happens when you install a new package outside of the standard htdocs or vhosts path and that package is referenced with an alias. This might also happen if you try to symlink into a directory outside the server's document root.

The cheater way out of this problem is to add a special Directory rule to allow access to that path. These are the simplest rules that will often "just get it working". These are very permissive rules. This is a quick fix. You should ensure that this is actually what you want to do.

  <Directory "/opt/my_package/cgi-bin/">
    AllowOverride All
    Options ExecCGI FollowSymLinks Indexes
    Order allow,deny
    Allow from all
  </Directory>