本地host 192.168.56.99 为nginx服务器ip
2.nginx.conf 配置
server {
listen
80
;
server_name www.qunar.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html-baidu;
index index.html index.htm;
}
}
server {
listen
81
;
server_name www.sougou.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html-sougou;
index index.html index.htm;
}
}
|
3.浏览器访问域名 www.sougou.com
4.浏览器访问域名 www.qunar.com