nginx @router否则会出现vue的路由在nginx中刷新出现404
server {listen8084;**root /home/yq/zx-web/dist/;**location / {**try_files $uri $uri/ /index.html;**expires 1d;indexindex.html index.htm;autoindex on;}#error_page404/404.html;error_page
·
server {
listen 8084;
**root /home/yq/zx-web/dist/;**
location / {
**try_files $uri $uri/ /index.html;**
expires 1d;
index index.html index.htm;
autoindex on;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
更多推荐
已为社区贡献1条内容
所有评论(0)