id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,uname,nginx_version 817,Wrong or undocumented srever resolving,marunin@…,,"I you mix listen :80 and listen 80 Than servers with listen 80 ignored and default (first) server {...} section always win Example: conf file server { listen 10.253.55.21:80; server_name name1; location / { return 401; } } server { listen 80; server_name name2; location / { return 402; } } $ wget -O- -S --header 'Host: name2' 'http://10.253.55.22/name2' --2015-10-20 00:40:02-- http://10.253.55.22/name2 Connecting to 10.253.55.22:80... connected. HTTP request sent, awaiting response... HTTP/1.1 401 Unauthorized Server: nginx/1.7.11 Date: Tue, 20 Oct 2015 00:40:02 GMT Content-Type: text/html Content-Length: 195 Connection: keep-alive Authorization failed. 401 returned, server name1 But server name2 (and code 402) expected",defect,closed,minor,,nginx-core,1.9.x,invalid,,,Linux marunin1-2 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.68-1+deb7u2~bpo60+1 x86_64 GNU/Linux,"nginx version: nginx/1.7.11 TLS SNI support enabled configure arguments: --prefix=/usr --user=www-data --group=www-data --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/cache/nginx/client-body --http-proxy-temp-path=/var/cache/nginx/proxy --http-fastcgi-temp-path=/var/cache/nginx/fastcgi --with-http_perl_module --with-http_ssl_module --with-http_sub_module --with-http_stub_status_module --with-http_realip_module --with-http_gunzip_module --with-zlib-asm=pentiumpro --add-module=./ngx_http_auth_pam_module --add-module=./nginx-sla --add-module=./ngx_devel_kit --add-module=./ngx_set_misc_module --with-debug"