总结:在平日配置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;
.............
}
|