nginx部署了两个项目
时间: 2023-08-21 09:04:40 浏览: 188
回答: 要在nginx中部署两个项目,你需要进行以下步骤。首先,在Vue项目的router配置中,使用mode为'history',并在base中指定应用的基础路径为'/two/'。然后,将打包后的dist文件放置在nginx的html目录下的project2文件夹中。接下来,你需要在nginx的配置文件中添加一个server块,监听8080端口,并将location指向root为/usr/share/nginx/html/project2。最后,启动nginx即可。你可以在nginx.conf文件中找到这些配置信息。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [Nginx部署两个vue项目](https://blog.csdn.net/peter__xu/article/details/125689155)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Nginx分端口部署两个或多个项目(包含反向代理配置)](https://blog.csdn.net/MZS2254399401/article/details/129217794)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文