server {
listen 8080;
server_name localhost;
location / {
root C:/nginx-1.14.2/html/xxx;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /sample {
alias C:/nginx-1.14.2/html/sample;
add_header Cache-Control no-store;
index index.html index.htm detail detail.html detail.htm;
try_files $uri $uri/ /sample/detail.html;
}
location @router {
rewrite ^.*$ /index.html last;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /api/ {
# rewrite ^.+apis/?(.*)$ /$1 break;
include uwsgi_params;
proxy_pass http://xxx:yyy/api/;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
}