Last active
August 29, 2015 14:17
-
-
Save paveltyavin/564e33af7b570c39ded4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream dr-tg.tyavin.name { | |
server localhost:8019 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
client_max_body_size 4G; | |
server_name dr-tg.tyavin.name; | |
access_log /var/log/dr-tg.log; | |
error_log /home/vinograd19/dr-tg/log/nginx_error.log; | |
keepalive_timeout 5; | |
location / { | |
proxy_pass http://dr-tg.tyavin.name; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location ~(50x\.html|favicon\.ico|robots\.txt) { | |
root /static/dr-tg/root; | |
} | |
location ~ ^/(static|media)/ { | |
gzip on; | |
gzip_min_length 1000; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
gzip_types application/x-javascript text/css application/json application/octet-stream text/plain; | |
add_header Cache-Control private; | |
root /static/dr-tg/; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
expires 365d; | |
add_header Cache-Control public; | |
if (!-f $request_filename) { | |
proxy_pass http://dr-tg.tyavin.name; | |
break; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment