Flask + mod_wsgi: client denied by server configuration

apache, flask, mod-wsgi, python, wsgi

Solution

It sounds like Apache doesn't have access to the object in question. Make sure you have an account set up for this specific reason and give the files access this account. Then use `chown` to set the access to these files for that user. In a development environment that can be for example the Apache account.

chown -R wwwrun:www /home/user1/Develop/

Or you could give everyone access, but I wouldn't recommend this.

chmod 777 -R /home/user1/Develop/

If that doesn't work you may need to manually allow access to the wsgi files in your apache config.

It should look something like this.

WSGIDaemonProcess flask_dbadmin user=wwwrun group=www threads=5
<VirtualHost *:80>

   ........

   <Directory /home/user1/Develop/ >
       Order allow,deny
       Allow from all
    </Directory>

   <Files flask_dbadmin.wsgi>
       Order allow,deny
       Allow from all
   </Files>
</VirtualHost>

Problem

I've been trying out quite a many things to the level of high frustration when trying to get Flask run with Apache + mod_wsgi. Basically I've done the following tutorials: http://flask.pocoo.org/docs/deploying/mod_wsgi/#installing-mod-wsgi http://www.lonesomedev.com/?p=169 But on browser I'm getting the following error: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403 And in Apache error.log the following: [Fri May 03 17:17:06 2013] [error] [client ::1] client denied by server configuration: /home/user1/Develop/flask_dbadmin.wsgi I'm running OpenSuse 11.4.

Original source

Related problems