Linux – Where is WSGI installed on Centos

centoslinuxmod-wsgipythonwsgi

I am getting a permissions issue when running django in daemon mode. Reading here https://code.google.com/p/modwsgi/wiki/ConfigurationIssues#Location_Of_UNIX_Sockets I think the solution is to configure the WSGISocketPrefix

The problem is that /var/run/wsgi is no where to be found on my centos server.

The closes thing I can find is: /etc/httpd/run/httpd.pid

How can I find where wsgi is installed?

Or what other value can I set the WSGISocketPrefix equal to?

Best Answer

From the link you have given;

The directory should be one that is only writable by 'root' user, or if not starting Apache as 'root', the user that Apache is started as.

This is the only requirement they have given. You can use an existing path the meets these requirements or create a new one.

The file, /etc/httpd/run/httpd.pid, is correct for Apache under Red Hat and derivatives. This location is defined in /etc/httpd/conf/httpd.conf. (If this location is changed, PIDFILE in /etc/sysconfig/httpd must be updated to match.)

ServerRoot "/etc/httpd"
...
PidFile run/httpd.pid

I would go ahead and set WSGISocketPrefix to the same path as the Red Hat location. However, you should be able to use /var/run/wsgi, if you wish. You just need to create the directory and assign permissions yourself.

Related Topic