nginx多IP域名绑定(域名独立IP绑定)
总结:在平日配置listen 80 的时候直接加上IP,如:listen 192.168.1.8:80即可详解
文件nginx.conf
include /usr/local/nginx/conf/vhost/www_domain1_com.conf;
include /usr/local/nginx/conf/vhost/www_domain2_com.conf;
文件www_domain1_com.conf 配置项
server { listen 199.71.255.001:80;
server_name www.domain1.com;
root/web/www/domain1;
.............
}
文件www_domain2_com.conf:
server{
listen 199.71.255.002:80;
server_name www.domain2.com;
root/web/www/domain2;
.............
}
页:
[1]