python-path not working for WSGIDaemonProcess (or WSGIDaemonProcess isn't working at all!)

2,788 views
Skip to first unread message

Dan

unread,
Apr 18, 2012, 4:57:48 PM4/18/12
to modwsgi
Hello all,

I'm trying to deploy a django project using the recommended daemon
mode. I read that rather than using WSGIPythonPath, one should pass
the path as an argument to WSGIDaemonProcess as "python-path". I have
tried this, but get an error with importing. If I go ahead and
include the WSGIPythonPath directive, the import works fine.

Does this mean my mod_wsgi is ignoring the daemon process directive
altogether? Here is a sample of my file:

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIDaemonProcess python-path=/home/ubuntu/site/site_proj
WSGIScriptAlias / /home/ubuntu/site/site_proj/djangoapp/wsgi.py
WSGIPythonPath /home/ubuntu/site/site_proj

Is there a way I can check whether daemon mode is working properly?

Graham Dumpleton

unread,
Apr 18, 2012, 5:39:16 PM4/18/12
to mod...@googlegroups.com
You are missing WSGIProcessGroup directive. You can validate using:

http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedded_Or_Daemon_Mode

Review setup instructions for daemon mode in:

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process

Graham

> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>

Dan

unread,
Apr 19, 2012, 8:35:49 AM4/19/12
to modwsgi
If there's currently no domain pointing to the site (i.e. it's in
development), would specifying the IP address rather than the domain
work?

Either way, thank you for the help. I will try it out now.

On Apr 18, 5:39 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> You are missing WSGIProcessGroup directive. You can validate using:
>
> http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedd...
>
> Review setup instructions for daemon mode in:
>
> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegat...
>
> Graham

Dan

unread,
Apr 19, 2012, 8:41:37 AM4/19/12
to modwsgi
I went ahead and assigned a subdomain to the IP address and everything
works great! :-)

On Apr 18, 5:39 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> You are missing WSGIProcessGroup directive. You can validate using:
>
> http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedd...
>
> Review setup instructions for daemon mode in:
>
> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegat...
>
> Graham

Graham Dumpleton

unread,
Apr 19, 2012, 10:14:42 PM4/19/12
to mod...@googlegroups.com
The domain should be totally irrelevant unless you aren't showing all
the relevant Apache configuration.

The only way your WSGI application would have been run in the daemon
process would be to have set WSGIProcessGroup or add appropriate
process-group option to WSGIScriptAlias. One when in daemon mode would
python-path option applied.

Anyway, so long as that validation check I pointed you to in
documentation now works, you should be fine. You might look at some of
the other validation checks you can run which are described in that
documentation to understand how your system is setup.

Graham

Reply all
Reply to author
Forward
0 new messages