NewsBlur/config/newsblur.conf

56 lines
No EOL
1.3 KiB
Text

upstream app_server {
server 127.0.0.1:8000 fail_timeout=1;
}
server {
listen 80 default;
client_max_body_size 4M;
server_name _;
location /media/admin/ {
alias /usr/local/lib/python2.6/dist-packages/Django-1.2.5-py2.6.egg/django/contrib/admin/media/;
}
location /media/ {
expires max;
keepalive_timeout 1;
root /home/sclay/newsblur;
}
location /favicon.ico {
alias /home/sclay/newsblur/media/img/favicon.png;
expires max;
access_log off;
}
location ^~ /crossdomain.xml {
expires max;
alias /home/sclay/newsblur/media/crossdomain.xml;
types {
text/x-cross-domain-policy xml;
}
}
location ^~ /robots.txt {
expires max;
alias /home/sclay/newsblur/media/robots.txt;
}
location /munin/ {
alias /var/cache/munin/www/;
}
location / {
if (-f /home/sclay/newsblur/media/maintenance.html) {
rewrite ^(.*)$ /media/maintenance.html last;
break;
}
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://app_server;
break;
}
}
}