forked from medialab/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-nginx.conf
36 lines (32 loc) · 1017 Bytes
/
docker-nginx.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
server {
listen 7000;
server_name localhost;
server_tokens off;
port_in_redirect off;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Robots-Tag "noindex, nofollow";
root /admin;
### Static HTML5/JS
location /admin {
alias /admin/;
index index.html index.htm;
try_files $uri $uri/ /index.html?$query_string;
}
### API
location /api/ {
proxy_pass http://${API_HOST}:${API_PORT}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
### Static site
location / {
proxy_pass http://${STATIC_HOST}:${STATIC_PORT}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}