vue-router的history模式发布配置
2018-02-06 12:44
981 查看
如果你正在尝试将基于vue-router的项目部署到windows中,希望本文能够有所帮助。
无需安装其他组件,将错误页指向index.html即可
启动如遇问题尝试使用命令创建/logs/nginx.pid文件:
不要设置环境变量,重启命令:
iis配置
无需安装其他组件,将错误页指向index.html即可
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web> <customErrors mode="On" defaultRedirect="index.html"> <error statusCode="404" redirect="index.html" /> </customErrors> </system.web> <system.webServer> <httpErrors errorMode="Custom"> <remove statusCode="404" /> <remove statusCode="500" /> <error statusCode="500" path="/index.html" responseMode="ExecuteURL" /> <error statusCode="404" path="/index.html" responseMode="ExecuteURL" /> </httpErrors> </system.webServer> </configuration>
nginx配置
启动如遇问题尝试使用命令创建/logs/nginx.pid文件:
nginx -c conf/nginx.conf
不要设置环境变量,重启命令:
start nginx -s -reload
server { listen 3355; location / { root F:/dist; index index.html; try_files $uri $uri/ /index.html; } }
相关文章推荐
- tomcat服务如何配置vue-router的history模式
- vue-router使用 history 模式刷新后404问题
- vue-cli 打包 使用 history模式 的后端配置
- vuejs router history 配置到iis的方法
- vue-router HTML5 History 模式
- vue-router的HTML5 History 模式设置
- Vue路由history模式踩坑记录:nginx配置解决404问题
- vue-router菜鸟进阶!(路由组件传参 vs H5 History模式)
- vue-router使用history的配置问题
- vue +vue-cli+vue router ,npm run build 打包完页面空白,不显示URL的#号router模式为history
- 解决vue-router嵌套路由(子路由)在history模式下刷新无法渲染页面的问题
- vue-router HTML5 History 模式(转自官网)
- Vue-router 中hash模式和history模式的区别
- vuejs router history 配置到iis
- vue-router踩坑之history模式的scrollBehavior
- vue-cli 打包使用history模式的后端配置实例
- vue-router中的hash和history两种模式的区别
- vue-router history 模式 iis 配置
- Vue2.0 框架配置:vue-cli + vue-router + vuex
- vue-router的两种模式的区别