準(zhǔn)備:
1.安裝nginx(window) http://nginx.org/en/download.html
解壓即可
image.png
2.準(zhǔn)備打包好的vue項目(dist) 這里dist文件目錄在: E:\projects\demos\vueAdmin-template0\dist
image.png
3.在nginx安裝目錄中找到nginx.confnginx-1.14.0\conf)進(jìn)行修改
image.png
4.運(yùn)行
#在nginx安裝目錄下cmd啟動nginx
start nginx
#訪問
127.0.0.1:8071/saas
image.png
5.在nginx安裝目錄下運(yùn)行指令
#啟動
start nginx
#重啟
nginx -s reload
#關(guān)閉
nginx -s quit 或 nginx -s stop
#
6.vue history模式下nginx
https://segmentfault.com/a/1190000010151973
image.png