下载nginx
下载地址
https://nginx.org/en/download.html
download > Stable version 可选择稳定版的nginx

nginx压缩包解压后的目录

配置
1.将打包好的dist放入html目录下

2.打开nginx.conf配置文件

修改地址
location / {
root html/dist;
index index.html index.htm;
}

启动
1.双击启动nginx

2.打开浏览器输入地址打开项目 http://localhost:8083/

总结
到此这篇关于nginx部署前端dist包的文章就介绍到这了,更多相关nginx部署前端dist包内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章希望大家以后多多支持IT俱乐部!
