1

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?

1
  • Which version of CentOS are you using? – Michael Hampton Apr 21 '15 at 5:32
0

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.

0

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

[root@APPS ~]# repoquery mod_wsgi
mod_wsgi-0:3.2-7.el6.i686
[root@APPS ~]# repoquery -l mod_wsgi
/etc/httpd/conf.d/wsgi.conf
/usr/lib/httpd/modules/mod_wsgi.so
/usr/share/doc/mod_wsgi-3.2
/usr/share/doc/mod_wsgi-3.2/LICENCE
/usr/share/doc/mod_wsgi-3.2/README

It is part of the yum-utils package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.