目录

Nginx部署若依前端

目录

Nginx部署若依前端

1、若依前端打包

npm run build:prod,生成dist文件夹。

2、ngnix配置

dist文件夹内所有内容,放在nginx/html文件夹中,删除空dist文件夹。

conf/nginx.conf打开,配置若依前端html单页面所在位置,如下图。 https://i-blog.csdnimg.cn/blog_migrate/80960cc3ccd6e738d660005d6440557a.png#pic_center 3、开启nginx

进入nginx根目录,cmd->start nginx.exe即可。