- vue项目,本地打包,npm run build
- 打包之后有dist目录
- nginx的配置指向dist根路径
- 直接访问nginx服务器就行了
server { listen XXXX; server_name XXXXXXXXX; location / { root /usr/local/vue-app/dist的根目录地址; try_files $uri $uri/ /index.html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
标签:index,vue,dist,部署,uri,笔记,nginx,html From: https://www.cnblogs.com/jiangym/p/18001486