update docs and example nginx/apache config
This commit is contained in:
parent
40e537a027
commit
5d205f2aee
5 changed files with 63 additions and 49 deletions
49
nginx/vhost.in
Normal file
49
nginx/vhost.in
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
server {
|
||||
listen 80 default;
|
||||
#server_name pandora.example.com;
|
||||
|
||||
access_log /var/log/nginx/pandora.access.log;
|
||||
error_log /var/log/nginx/pandora.error.log;
|
||||
|
||||
location /admin/media {
|
||||
root __PREFIX__/src/django/django/contrib;
|
||||
autoindex on;
|
||||
}
|
||||
location /favicon.ico {
|
||||
root __PREFIX__/static;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
root __PREFIX__;
|
||||
autoindex on;
|
||||
}
|
||||
location /data/ {
|
||||
internal;
|
||||
root __PREFIX__;
|
||||
}
|
||||
|
||||
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:2620;
|
||||
break;
|
||||
}
|
||||
}
|
||||
location /api/upload {
|
||||
client_max_body_size 32m;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
location /404.html {
|
||||
root __PREFIX__/pandora/static;
|
||||
}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location /50x.html {
|
||||
root __PREFIX__/static;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue