wsgi.xml
---
<uwsgi>
<pythonpath>/usr/local/django/voxi/</pythonpath>
<pythonpath>/usr/local/django/</pythonpath>
<env>DJANGO_SETTINGS_MODULE=voxi.settings</env>
<module>django.core.handlers.wsgi.WSGIHandler()</module>
<master/>
<processes>6</processes>
<socket>/tmp/cherokee/voxi.sock</socket>
<chmod/>
</uwsgi>
I'm wondering what, if anything, I need to do to make this work with virtualenv? Is it as simple as running './uwsgi -x wsgi.xml -H voxi'?
_______________________________________________
Cherokee mailing list
Cher...@lists.octality.com
http://lists.octality.com/listinfo/cherokee
> I've followed a setup for uWSGI previously discussed here and set up an xml file that pretty much contains everything I was doing on the command line (Thanks Roberto!):
>
> wsgi.xml
> ---
> <uwsgi>
> <pythonpath>/usr/local/django/voxi/</pythonpath>
> <pythonpath>/usr/local/django/</pythonpath>
> <env>DJANGO_SETTINGS_MODULE=voxi.settings</env>
> <module>django.core.handlers.wsgi.WSGIHandler()</module>
> <master/>
> <processes>6</processes>
> <socket>/tmp/cherokee/voxi.sock</socket>
> <chmod/>
> </uwsgi>
>
>
> I'm wondering what, if anything, I need to do to make this work with virtualenv? Is it as simple as running './uwsgi -x wsgi.xml -H voxi'?
>
> __
Yes but try to use absolute path for venv.
By the way i suggest you to include the virtualenv in the xml file
<home>/path_to/voxi</home>
--
Roberto De Ioris
http://unbit.it
JID: rob...@jabber.unbit.it
wsgi.xml
---
<uwsgi>
<home>/srv/python-environments/voxinfinitus/</home>
<pythonpath>/srv/python-environments/voxinfinitus/</pythonpath>
<pythonpath>/srv/python-environments/</pythonpath>
<env>DJANGO_SETTINGS_MODULE=settings</env>
<module>django.core.handlers.wsgi.WSGIHandler()</module>
<master/>
<processes>6</processes>
<socket>/tmp/cherokee/voxi-live.sock</socket>
<chmod/>
</uwsgi>
Have I made a mistake in the XML?
[uWSGI] parsing config file /srv/python-environments/voxinfinitus/wsgi.xml
*** Starting uWSGI 0.9.6.2 (32bit) on [Tue Sep 28 14:37:22 2010] ***
compiled with version: 4.5.1
Python version: 2.6.5 (r265:79063, Apr 1 2010, 05:22:20)
[GCC 4.4.3 20100316 (prerelease)]
your memory page size is 4096 bytes
allocated 412 bytes (0 KB) for 1 request's buffer.
Setting PythonHome to /srv/python-environments/voxinfinitus/...
binding on UNIX socket: /tmp/cherokee/voxi-live.sock
your server socket listen backlog is limited to 64 connections
added /srv/python-environments/voxinfinitus/ to pythonpath.
added /srv/python-environments/ to pythonpath.
initializing hooks...done.
ImportError: No module named WSGIHandler()
I'm able to import that module in the Python interpreter without an issue. Hmm...
>> <module>django.core.handlers.wsgi.WSGIHandler()</module>
Should have been:
<module>django.core.handlers.wsgi:WSGIHandler()</module>
My apologies! I wasn't paying close enough attention. All is working now.