0
点赞
收藏
分享

微信扫一扫

NGNIX 配置一个服务器上80端口绑定多个域名多个网站


NGNIX 配置一个服务器上80端口绑定多个域名多个网站

 

 

1:域名解析修改:

 

修改回原来的主机:

 

2:Ngnix.conf 补充:
server {
listen 80;
server_name xxx.com www.xxx.com;
root "D:/WWW/webtest";
index index.html index.htm index.php;
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

 

3:补充对应网站代码

 

 

4:最终效果

 

 

同时原来主机未受到影响:

 

 

 



举报

相关推荐

0 条评论