1
0
Fork 0
empact/nginx.conf

37 lines
757 B
Nginx Configuration File

upstream empact {
server 127.0.0.1:8080 max_fails=3 fail_timeout=30s;
}
server {
listen 80 default_server;
root /home/empact/app/static;
charset utf-8;
location / {
index hello.html;
}
location ~ ^/app/ {
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/empact/app/static/images/favicon.ico;
}
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;
}
}