老师好
vhost只有一个happymmall.com.conf配置文件
happymmall.com.conf配置文件信息如下:
upstream www.happymmall.com{
server www.happymmall.com:8080 weight=1;
server www.happymmall.com:9080 weight=1;
#server www.imooc.com:8080;
#server www.imooc.com:9080;
}
server {
listen 80;
autoindex on;
server_name happymmall.com www.happymmall.com;
access_log D:\DevInstall\ftpfile\logs\access.log combined;
index index.html index.htm index.jsp index.php;
#error_page 404 /404.html;
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location / {
proxy_pass http://www.happymmall.com;
add_header Access-Control-Allow-Origin *;
}
}
host配置信息如下:
127.0.0.1 www.happymmall.com
127.0.0.1 user.happymmall.com
问题:
访问www.happymmall.com可以跳转到index.jsp
访问user.happymmall.com页也可以跳转到index.jsp,没有配置user.happymmall.com,为什么也可以访问到index.jsp?