On an OS X server, I followed the mod_wsgi installation instructions and when I run apachectl -M
the output says that mod_wsgi is loaded. On the other hand, when opening the Apache logs after restarting the service, there is no indication that mod_wsgi is loaded. I have tried using mod_wsgi-express and recompiling and reinstalling mod_wsgi, but to no avail. How would I make sure that mod_wsgi is actually being loaded by Apache?
Asked
Active
Viewed 260 times
1

user2867777
- 31
- 2
-
The mod_wsgi-express stands as a distinct setup to your main Apache, it doesn't come into the picture if you want to install mod_wsgi from source code yourself and manually configure Apache. You will need to indicate what configuration you added into Apache configuration files and show what the actual error is. – Graham Dumpleton Jun 29 '16 at 14:51
1 Answers
0
Add this section to your Apache config (perhaps in /etc/httpd/conf.d
) and see if it errors?
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName yoursite.com
WSGIDaemonProcess yoursite-http python-home=/home/vagrant/.virtualenvs/yoursite
WSGIScriptAlias / /var/www/html/yoursite/yoursite/wsgi.py process-group=yoursite-http application-group=%{GLOBAL}
<Directory /var/www/html/yoursite/yoursite>
Require all granted
</Directory>
WSGIProcessGroup yoursite-http
</Virtualhost>

FlipperPA
- 13,607
- 4
- 39
- 71
-
1Recommended practice is that when using a daemon process group for a single application you set ``application-group`` to ``%{GLOBAL}`` not some named sub interpreter. That special value ensures the main interpreter context is used, which avoids problems with some third party C extensions which haven't been implemented correctly for sub interpreters. – Graham Dumpleton Jun 29 '16 at 14:53