Graham Dumpleton
2008-02-03 23:40:03 UTC
I am trying to configure mod_wsgi to run in daemon mode with
Apache. I can easily get it to run 'normally' under Apache
but I obtain permission errors _or_ process-failures in
... (13)Permission denied: mod_wsgi (pid=26962): Unable
to connect
to WSGI daemon process '<process-name>' on
'/etc/httpd/logs/wsgi.26957.0.1.sock' after multiple attempts.
Apache. I can easily get it to run 'normally' under Apache
but I obtain permission errors _or_ process-failures in
... (13)Permission denied: mod_wsgi (pid=26962): Unable
to connect
to WSGI daemon process '<process-name>' on
'/etc/httpd/logs/wsgi.26957.0.1.sock' after multiple attempts.
<http://groups.google.com/group/modwsgi/browse_thread/thread/6d3a2f4d7...>
The problem was WSGI trying to create its .sock file in /var/log/httpd but failing and therefore not running at all. The user I had specified did not have enough permissions to do so (part of the point _of_ running in daemon mode, LOL). Oddly, I had attempted to grant the permissions for the user but see now there was an error in how I did that... oops.
WSGISocketPrefix /tmp/wsgi
http://code.google.com/p/modwsgi/wiki/ConfigurationIssues
Since you have given a real live example error message from logs for
when it goes wrong, I'll be able to include this in the documentation.
That may make it easier for others to find that page when they do a
Google search. At the moment the page only mentioned that you would
get a '503 Service Temporarily Unavailable' response in browser.
Graham
We now have successss!
WSGISocketPrefix /tmp/wsgi
<VirtualHost host.domain.com:80>
ServerName host.domain.com
WSGIDaemonProcess <process-name> user=<user> group=<group> threads=10 \
maximum-requests=500
WSGIScriptAlias /something /path/to/<script>.wsgi
<Directory /path/to/<script>.wsgi>
WSGIApplicationGroup <user>
WSGIProcessGroup <process-name>
Order deny,allow
Allow from all
</Directory>
Thanks, Brian, for pointing me back to the modwsgi list for another look!
Scott
WSGISocketPrefix /tmp/wsgi
<VirtualHost host.domain.com:80>
ServerName host.domain.com
WSGIDaemonProcess <process-name> user=<user> group=<group> threads=10 \
maximum-requests=500
WSGIScriptAlias /something /path/to/<script>.wsgi
<Directory /path/to/<script>.wsgi>
WSGIApplicationGroup <user>
WSGIProcessGroup <process-name>
Order deny,allow
Allow from all
</Directory>
Thanks, Brian, for pointing me back to the modwsgi list for another look!
Scott