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;
}
}
第一个定义
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;
}
}
相关文章推荐
- nginx是否存在文件类型解析漏洞(转)
- Nginx安装与配置文件解析
- nginx配置信息的解析流程
- IIS 6.0/7.0/7.5、Nginx、Apache 等 Web Service 解析漏洞总结
- Nginx_handler模块发开(hello模块结构解析)
- nginx封锁恶意IP,并且定时取消的两种脚本
- Nginx 域名被非法解析处理 禁止未绑定域名访问
- 【Nginx】初识nginx---配置文件解析
- 基于软件的负载均衡(Nginx与ZooKeeper解析)
- nginx subrequest的实现解析
- Ubuntu nginx与Apache端口冲突php无法解析解决办法
- Nginx 原理解析和配置摘要
- Apache和Nginx运行原理解析
- Nginx安装与配置文件解析
- nginx配置文件大解析(优化)
- nginx解析漏洞 只要可以上传文件就会被黑
- Nginx 配置文件示例解析
- 安装Nginx过程全解析
- 利用nginx使域名解析到tomcat相应的目录下
- nginx subrequest的实现解析