Akendo 1 Follower

Blog of Akendo

Location: Berlin

Quick Links

View Show Available Profiles

Authors (0)

Alex

Related Projects / Groups


How to deploy wsgi with apache

Public feed posted on Fri, 27 Apr 2012 by Alex


Related to the  previors Post, i hade now to apply from virtualenv to a apache webserver. I used to deployed it with  the WSGI.

For that you need to enable the mod_wsgi in apache2.

To enable it in debian:

1
2
3
apt-getinstall libapache2-mod-wsgi
a2enmod wsgi
services apache2 restart

Now disabling the old mod_python in the configuration files. Add this to the top of your virtualhost file:

1
2
3
4
5
6
7
8
9
10
WSGIDaemonProcess $GROUPNAME python-path=/path/to/django/project/.env/lib/python2.6/site-packages user=apache group=apache processes=2threads=25
WSGIProcessGroup $GROUPNAME
WSGIScriptAlias /"/path/to/django/project/wsgi.py"
Documentroot /path/to/django/project/<Directory /path/to/django/project/><Files wsgi.py>
 Order allow,deny
 Allow from all
 Files>Directory>

This is it. Some details:

Important is to set a  WSGIDaemonProcess, it allows to specifically the resource that the WSGI Process can use. Then the $GROUPENAME(Set it as you like to), so when you have more then one WSGI implementation, that the WSGI no interfering each other. There still some more options possible.


>(This is an imported feed item. You can read the original item at /blog.akendo.eu/deploy-wsgi-virtualenv-django/"><span class="http-markup"><a href="http://blog.akendo.eu/deploy-wsgi-virtualenv-django/" rel="nofollow">http://blog.akendo.eu/deploy-wsgi-virtualenv-django/</a></span>)

This Evis needs your voice! Please Login to post comments.