Created
September 7, 2011 22:46
-
-
Save bwells/1202034 to your computer and use it in GitHub Desktop.
webserver config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== upstart config file === | |
description "uWSGI Emperor" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
env BINPATH=/usr/bin/uwsgi | |
exec $BINPATH --emperor "/var/www/*/Application/emperor.ini" --binary-path $BINPATH | |
=========================== | |
=== nginx config section === | |
location /ERP/ { | |
uwsgi_pass unix:///tmp/uwsgi-erp.sock; | |
include uwsgi_params; | |
uwsgi_read_timeout 600; | |
} | |
============================ | |
=== emperor.ini ============ | |
[uwsgi] | |
master = true | |
lazy = true | |
processes = 1 | |
buffer-size = 3200 | |
pythonpath = /var/www/ERP/Application | |
virtualenv = /var/www/ERP/Environment/ | |
daemonize = /var/log/uwsgi.log | |
pidfile2 = /var/run/uwsgi/erp.pid | |
socket = /tmp/uwsgi-erp.sock | |
chmod-socket = 660 | |
vacuum = true | |
uid = web | |
gid = web | |
wsgi-file = /var/www/ERP/Application/app.wsgi | |
============================ | |
=== wsgi-file: app.wsgi ==== | |
import os | |
from paste.deploy import loadapp | |
from paste.script.util.logging_config import fileConfig | |
BASEDIR = os.path.dirname(os.path.abspath(__file__)) | |
INIFILE = os.path.join(BASEDIR, 'wsgi.ini') | |
fileConfig(INIFILE) | |
application = loadapp("config:%s" % INIFILE) | |
============================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment