1
0
Fork 0
empact/nginx.conf

40 lines
903 B
Nginx Configuration File
Raw Permalink Normal View History

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