背景:
nginx的话,有时候,想部署多个配置,比如:使用不同的端口配置不同的web工程。
比如:8081部署:项目1的web页面。
8082部署:项目2的web页面。
1)nginx.conf
- worker_processes 1;
-
- events {
- worker_connections 1024;
- }
-
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
-
- # 这个很重要,包含下
- include web/*.conf;
- }
-
2)新建web文件夹

3)web里面随便取名字,比如:这里是:图书管理系统。使用8085端口

- server{
- listen 8085;
-
- location / {
- root D:/8_me/book/itmk-base-parent/boot-project-web/dist;
- index index.html index.htm;
- }
- }
4)访问下web页面,发现ok了
