server {
listen 19095;
server_name localhost;
#运营
#charset koi8-r;
#access_log logs/host.access.log main;
location ^~/easy/manager {
#后端的地址,解决跨域问题,把前端的请求在ng里面转下,骗过浏览器是同个端口
proxy_pass http://172.16.40.190:203;
}
location / {
alias easy/dist/;
#try_files $uri $uri/ /index.html;
#这边是清理缓存的
add_header Cache-Control no-store;
add_header Pragma no-cache;
}
#error_page 404 /404.html;
#处理nginx404的错误,找不到文件跳到index.html
error_page 404 /index.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /nginx-status {
stub_status on;
}
}
ng如何清理缓存还有解决跨域的问题
最新推荐文章于 2024-07-24 07:27:44 发布