目的:
nginx部署打包成为dist的前端项目
(学习视频分享:php视频教程)
相关知识:
立即学习“前端免费学习笔记(深入)”;
docker 安装与使用 docker pull nginx docker run --restart=on-failure:20 -itd --name nginx -p 80:80 nginx:latest
SEO
nginx如何部署dist? nginx如何部署vue? nginx如何部署前端项目?
安装nginx后,配置
该文件放在/etc/nginx/conf.d/xxx.conf
server{ listen 80; server_name xxx.com; location /{ root /home/web/vueProjects/wxopapp/dist/; index index.htm index.html; expires 30d; } }
nginx -t nginx -s reload
相关推荐:nginx教程
以上就是nginx怎么正确部署前端项目的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号