oxdata/etc/nginx/sites-available/oxdata

44 lines
1 KiB
Text

server {
listen 80;
server_name oxdata;
access_log /var/log/nginx/oxdata.access.log;
location /admin/media {
root /srv/oxdata/lib/python3.5/site-packages/django/contrib;
autoindex on;
}
location /favicon.ico {
root /srv/oxdata/oxdata/static;
}
location /robots.txt {
root /srv/oxdata/oxdata/static;
}
location /static {
root /srv/oxdata/oxdata;
autoindex on;
}
location /media/ {
internal;
root /srv/oxdata/oxdata/;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto http;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8087;
break;
}
}
error_page 404 /404.html;
error_page 403 /404.html;
location /404.html {
root /srv/oxdata/oxdata/static;
}
}