Virtualenv
Z Varhoo
Init project's space for Django application
cd /var/www/projects/ virtualenv prod source prod/bin/activate
Deafultní nastavení /etc/uwsgi/config.xml
<varhoo> <uwsgi id="1"> <pythonpath>/var/projects/prod</pythonpath> <master/> <no-orphans/> <processes>1</processes> <optimize>0</optimize> <home>/var/projects/prod</home> <limit-as>128</limit-as> <chmod-socket>660</chmod-socket> <uid>administration</uid> <gid>webusers</gid> <pidfile>/var/projects/pid/admin.pid</pidfile> <http>localhost:8002</http> <wsgi-file>/var/projects/prod/vhm0/server/wsgi.py</wsgi-file> <daemonize>/var/projects/log/admin.log</daemonize> <chdir>/var/projects/prod/vhm0/server/</chdir> </uwsgi> </varhoo>
Compilování modulu mod_proxy_uwsgi pro apache2
wget https://raw.githubusercontent.com/unbit/uwsgi/master/apache2/mod_proxy_uwsgi.c apxs2 -i -c mod_proxy_uwsgi.c
A použití je pak následující
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so ProxyPass / uwsgi://127.0.0.1:3031/