diff --git a/etc/nginx.conf b/etc/nginx.conf new file mode 100644 index 0000000..b6f0ea3 --- /dev/null +++ b/etc/nginx.conf @@ -0,0 +1,21 @@ +# Example config for a site on nginx using supervisor/gunicorn +server { + server_name www.example.com example.com; + listen 80; + + root /home/www-data/git/rophako; + + location /static { + alias /home/www-data/www/static; + } + location /favicon.ico { + alias /home/www-data/www/favicon.ico; + } + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://127.0.0.1:9000; + } +} diff --git a/etc/rophako.conf b/etc/rophako.conf new file mode 100644 index 0000000..a0bb6d2 --- /dev/null +++ b/etc/rophako.conf @@ -0,0 +1,6 @@ +# Example conf for supervisor +[program:rophako] +command = /home/www-data/.virtualenv/rophako/bin/gunicorn -b 127.0.0.1:9000 wsgi_gunicorn:app +environment = ROPHAKO_SETTINGS="/home/www-data/site/settings.ini" +directory = /home/www-data/git/rophako +user = www-data diff --git a/wsgi_gunicorn.py b/wsgi_gunicorn.py new file mode 100755 index 0000000..dca48a0 --- /dev/null +++ b/wsgi_gunicorn.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +from rophako.app import app + +if __name__ == "__main__": + app.run(host='127.0.0.1')