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?

  • Which version of CentOS are you using? Apr 21, 2015 at 5:32

2 Answers 2


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.


One option is to use repoquery -l mod_wsgi to see what files get placed where.

[root@APPS ~]# repoquery mod_wsgi
[root@APPS ~]# repoquery -l mod_wsgi

It is part of the yum-utils package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .