Invalid command 'WSGIDaemonProcess'

9,889 views
Skip to first unread message

Jose Sibande

unread,
Jul 25, 2009, 9:11:33 AM7/25/09
to Django users
I just uploaded my application to my server and this is the error that
I am getting when I try to restart apache:
Restarting web server: apache2Syntax error on line 6 of /etc/apache2/
httpd.conf:
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by
a module not included in the server configuration
failed!

And my /etc/apache2/httpd.conf file looks like this:
<VirtualHost *:80>

ServerAdmin jose@localhost
ServerName scihelp.info

WSGIDaemonProcess mocenter user=jose group=jose threads=25
WSGIProcessGroup mocenter

Alias /admin_media /usr/lib/python2.5/site-packages/django/contrib/
admin/me$

<Location /admin_media>
Order allow,deny
Allow from all
</Location>

Alias /media/ /home/jose/Django/mocenter/media/

<Directory /home/jose/Django/mocenter/media>
Order deny,allow
Allow from all
</Directory>

WSGIScriptAlias / /home/jose/Django/mocenter/apache/django.wsgi

<Directory /home/jose/Django/mocenter/apache>
Order deny,allow
Allow from all
</Directory>

</VirtualHost>

Everything worked well on my local server


Daniel Roseman

unread,
Jul 25, 2009, 1:41:12 PM7/25/09
to Django users
On Jul 25, 2:11 pm, Jose Sibande <jbsiba...@gmail.com> wrote:
> I just uploaded my application to my server and this is the error that
> I am getting when I try to restart apache:
> Restarting web server: apache2Syntax error on line 6 of /etc/apache2/
> httpd.conf:
> Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by
> a module not included in the server configuration
>  failed!
>
> And my /etc/apache2/httpd.conf file looks like this:
<snip>

You don't seem to be actually loading the mod_wsgi module. According
to the mod_wsgi installation docs[1], you should do this before the
VirtualHosts:

LoadModule wsgi_module modules/mod_wsgi.so

--
DR.

[1] http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Loading_Module_Into_Apache

Graham Dumpleton

unread,
Jul 25, 2009, 7:42:45 PM7/25/09
to Django users
> [1]http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Loading_...

And if it isn't that, be aware that daemon mode isn't available for
the following:

1. Windows.
2. Apache 1.3 on UNIX
3. Apache 2.X where the underlying Apache Runtime Libraries are not
built with thread support.

Number 3 is still sometimes the case on BSD systems. Note that 3 has
got nothing to do with prefork MPM. If the APR has thread support,
even if you are using prefork MPM, you can still use daemon mode.

Graham
Reply all
Reply to author
Forward
0 new messages