-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwww.conf
56 lines (48 loc) · 1.47 KB
/
www.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
map $http_host $doc_root {
hostnames;
default /usr/share/nginx/html/;
# serve different contents basing on `HOST` http header
secure.* /usr/share/nginx/html/cp; # clientportal, if HOST matches `secure.*`
ibportal.* /usr/share/nginx/html/ib; # ibportal, if HOST matches `ibportal.*`
}
server {
listen 80;
root $doc_root;
index index.html index.htm;
# access_log /dev/stdout;
# error_log /dev/stdout;
add_header Strict-Transport-Security "max-age=31536000";
add_header X-Frame-Options deny;
add_header X-Content-Type-Options nosniff;
location ~* \.(gif|jpg|jpeg|png|css|js|ico|eot|otf|fon|font|ttf|ttc|woff|woff2)$ {
add_header Cache-Control 'public';
}
location ~* \.(html)$ {
add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0';
}
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
location ~* /(api|cp/api|monitor) {
proxy_pass http://excalibur:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
error_page 505 502 503 504 /50x.html;
error_page 404 /404.html;
location = /50x.html {
root html;
}
location = /500.jpg {
root html;
}
location = /404.html {
root html;
}
location = /404.jpg {
root html;
}
}