TransWikia.com

Where is WSGI installed on Centos?

Server Fault Asked by petey on February 21, 2021

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?

2 Answers

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.

Answered by Brian on February 21, 2021

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.

Answered by Aaron Copley on February 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP