jeecgboot項目,使用nginx部署vue項目刷新報404,正常訪問沒問題,只有在刷新的時候才會出現問題
server {
listen 80;
server_name localhost;
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
別問,問就這一句話try_files $uri $uri/ /index.html;