vuejs在nginx非根目录下部署,页面强制刷新时出现404解决方法。
server { listen 80; server_name xxxx.com; #charset koi8-r; #access_log logs/host.access.log main; location /vuejs-admin-server { proxy_pass http://127.0.0.1:8080/vuejs-admin-server; } #二级目录配置开始 location ^~/tools { alias /www/wwwroot/xxx.cn/tools/; #index index.html; try_files $uri $uri/ @rewrites; } location @rewrites { rewrite ^/(tools)/(.+)$ /$1/index.html last; } #二级目录配置结束 error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
上面是“解决vuejs应用在nginx非根目录下部署时强制刷新404”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_2142.html
workflows工作流
一个孤独的身影在未来主义城市
一只乌鸦栖息在一盏神灯上
一只可爱的快乐老鼠戴着帽子ComfyUI工作流
星空星域星球comfyui工作流
乡村枯树黄花comfyui工作流
一盒用五颜六色的食材烹制的热气腾腾的寿司
一名男子跪在月球岩石表面看见小行星碰撞
一尊白玉佛像ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!