server {
listen 80;
server_name snyyy.cn; # 域名
root /web;
location /api/ {
proxy_pass http://127.0.0.1:3000/; # 改成测试环境api地址(域名)
}
location / {
try_files $uri $uri/ /index.html;
}
location ~.*\.(html|htm)$ {
add_header Cache-Control "no-cache";
}
location ~\.\w+$ {
expires 365d;
}
}