-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
36 lines (29 loc) · 972 Bytes
/
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 80;
client_max_body_size 4G;
root /home/sparcs/zabo-front-reactjs/deploy;
index index.html;
server_name _;
location / {
try_files $uri $uri/ /index.html;
# index index.html;
}
location ~* \.(?:manifest|appcache|html?|xml|json|service-worker\.js)$ {
expires -1;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
location /api {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass "http://127.0.0.1:6001";
}
}