您的位置:首页 > 运维架构 > Nginx

Nginx取消泛解析

2011-02-26 13:28 357 查看
定义两个“虚拟主机”
第一个定义
listen 80 default;
这个定义里面没有server_name

第二个定义
listen 80;
这个定义里面有server_name

举例:

server {

listen 80 default;

}

server {

listen 80;

server_name localhost;

location / {

root /data/web/;

index index.html index.htm;

}

location /status {

stub_status on;

}

error_page 500 502 503 504 /50x.html;

location = /50x.html {

root html;

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  php Mysql web服务器