Getting client denied when accessing a wsgi graphite script

I'm trying to set up graphite on my Mac OS X 10.7 lion, i've set up apache to call the python graphite script via WSGI, but when i try to access it, i get a forbiden from apache and in the error log.

 "client denied by server configuration: /opt/graphite/webapp/graphite.wsgi"

I've checked that the scripts location is allowed in httpd.conf, and the permissions of the file, but they seem correct. What do i have to do to get access. Below is the httpd.conf, which is nearly the graphite example.

<IfModule !wsgi_module.c>
   LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
WSGISocketPrefix /usr/local/apache/run/wigs   
<VirtualHost _default_:*>
    ServerName graphite
    DocumentRoot "/opt/graphite/webapp"
    ErrorLog /opt/graphite/storage/log/webapp/error.log
    CustomLog /opt/graphite/storage/log/webapp/access.log common
    WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
    WSGIProcessGroup graphite
    WSGIApplicationGroup %{GLOBAL}
    WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
    # XXX You will need to create this file! There is a graphite.wsgi.example
    # file in this directory that you can safely use, just copy it to graphite.wgsi
    WSGIScriptAlias / /opt/graphite/webapp/graphite.wsgi
    Alias /content/ /opt/graphite/webapp/content/
    <Location "/content/">
            SetHandler None
    </Location>
    # XXX In order for the django admin site media to work you
    Alias /media/ "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-   packages/django/contrib/admin/media/"
    <Location "/media/">
            SetHandler None
    </Location>
    # The graphite.wsgi file has to be accessible by apache. 
    <Directory "/opt/graphite/webapp/">
            Options +ExecCGI
            Order deny,allow
            Allow from all
    </Directory>
</VirtualHost>

Can you help?


Since apache 2.4, Require all granted is required:

<Directory /opt/graphite/conf>
    Require all granted
</Directory>

Up to apache 2.2, you would write:

<Directory /opt/graphite/conf>
    Order deny,allow
    Allow from all
</Directory>

See upgrading notes.

Note that you can activate mod_access_compat to use old (pre 2.4) directives in apache 2.4. It might be useful if you want to quickly rule out this as the cause for your initial issue, but frankly, the migration to Require is easy enough, there is not point using this module just to postpone it.


http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration

It is always one of those reasons.