1
0
Fork 0
empact/nginx.conf

39 lines
872 B
Nginx Configuration File

upstream empact {
server 127.0.0.1:8080 weight=10;
# Server with enabled profiling
# server 127.0.0.1:8081 max_fails=1 fail_timeout=30s;
}
server {
listen 80 default_server;
root /home/www/app/static;
charset utf-8;
location ~ ^/app/ {
add_header Cache-Control private;
add_header X-UA-Compatible IE=edge;
add_header Content-Language en;
rewrite ^/app/(.*) /app.html last;
}
location ~ ^/(auth|api)/ {
add_header Cache-Control private;
proxy_pass http://empact;
}
location /favicon.ico {
alias /home/www/app/static/images/favicon.ico;
add_header Cache-Control public;
expires 1d;
}
location ~ .*\.(js|css|png)$ {
add_header Cache-Control public;
add_header Last-Modified $sent_http_Expires;
expires 1h;
etag on;
gzip_static on;
gzip on;
gzip_proxied any;
gzip_vary on;
}
}