nginx代理了index.html,但是login页面不能刷新,需要配置nginx,直接上代码
listen 80;
server_name ip.ip.ip.ip;
location / {
add_header Cache-Control no-store;
add_header Pragma no-cache;
add_header Expires 0;
root /home/wangyf/dist/;
try_files $uri $uri/ @router;
autoindex on;
#index index.html index.htm;
#proxy_pass http://localhost:9998/;
}
location @router {
rewrite ^.*$ /index.html last;
}