1、免装版本nginx本地测试
1-1 下载并解压放置到任意目录下
1-2 配置文件

在nginx-conf文件中配置端口与测试模板,测试项目时需将dist目录复制到html目录下
js
location /dist {
root html;
index index.html index.htm;
try_files $uri $uri/ /dist/index.html;
}location /dist {
root html;
index index.html index.htm;
try_files $uri $uri/ /dist/index.html;
}

1-3 启动nginx
start nginxstart nginx访问测试项目
html
http://localhost:8088/dist或http://127.0.0.1:8088/disthttp://localhost:8088/dist或http://127.0.0.1:8088/dist