您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

nginx多网站怎么配置

2024/2/29 9:47:54发布11次查看
配置文件:
代码如下:
    http { 
     server { 
     listen          80; 
     server_name     www.domain1.com; 
     access_log      logs/domain1.access.log main; 
     location / { 
     index index.html; 
     root  /var/www/domain1.com/htdocs; 
     } 
     }
server { 
     listen          80; 
     server_name     www.domain2.com; 
     access_log      logs/domain2.access.log main; 
     location / { 
     index index.html; 
     root  /var/www/domain2.com/htdocs; 
     }
     }
    }
说明:
只要在模块里面新增模块;具体的根据您的实际需求去配置。
以上就是nginx多网站怎么配置的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product