-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_80.conf
42 lines (35 loc) · 1.23 KB
/
server_80.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
root /public;
access_log /var/log/nginx/access.log eb_log;
if ($http_x_forwarded_proto = "http") {
rewrite ^(.*) https://$host$request_uri? permanent;
return 301;
}
location @app {
proxy_pass http://app;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection "";
#Bumping up to deal with giant carts during ebook sale
proxy_read_timeout 600s;
proxy_http_version 1.1;
}
location / {
try_files $uri/index.html $uri.html $uri @app;
error_page 404 /404.html;
error_page 422 /422.html;
error_page 500 502 503 504 /500.html;
error_page 403 /403.html;
}
location ~* ^/assets/ {
try_files $uri @app;
add_header Access-Control-Allow-Origin *;
# Per RFC2616 - 1 year maximum expiry
expires 1y;
add_header Cache-Control public;
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
add_header Last-Modified "";
add_header ETag "";
break;
}