This commit is contained in:
j 2011-02-23 10:57:23 +01:00
parent 8c4896bc51
commit f9745b38f3
3 changed files with 54 additions and 0 deletions

14
nginx/oxdata.conf Normal file
View file

@ -0,0 +1,14 @@
# oxdata gunicorn daemon
#
description "oxdata daemon"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
chdir /srv/oxdata/oxdata
exec /srv/oxdata/bin/gunicorn_django --daemon -u oxdata -g oxdata -b 127.0.0.1:8087 -w2 settings.py

39
nginx/vhost.in Normal file
View file

@ -0,0 +1,39 @@
server {
listen 80;
server_name oxdata;
access_log /var/log/nginx/oxdata.access.log;
location /admin/media {
root __PREFIX__/src/django/django/contrib;
autoindex on;
}
location /favicon.ico {
root __PREFIX__/oxdata/static;
}
location /static {
root __PREFIX__/oxdata;
autoindex on;
}
location /media/ {
internal;
root __PREFIX__/oxdata/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8087;
break;
}
}
error_page 404 /404.html;
location /404.html {
root __PREFIX__/oxdata/static;
}
}

1
oxdata/static/404.html Normal file
View file

@ -0,0 +1 @@
File not found