Re: server_name for localhost actually matches .localhost

2018-12-17 Thread oscaretu
Hello, Gianluigi I suppose the response is coming from the default server: if the vhost servername of the request doesn't match any of the defined ones, the answer will come from the default server. If you add an alternate servername "test.localhost" where you defined "localhost" in the config fil

Re: server_name for localhost actually matches .localhost

2018-12-16 Thread Gianluigi Zanettini
Ok, this seems related to the specific use of localhost. If I try it with any other domain name, it works as expected. I'm still interested in an answer for my own learning, but it's definitely lower priority now. Il giorno lun 17 dic 2018 alle ore 01:10 Gianluigi Zanettini ha scritto: > Hi gu

Fwd: server_name for localhost actually matches .localhost

2018-12-16 Thread Gianluigi Zanettini
Hi guys, I'm testing my config on localhost with nginx/1.15.7 before deploying. Since I only want to handle specific hostnames, I setup a catch-default: server { listen 443 ssl default_server; ... return 400; } Then I setup my real config: server { server_name localhost; root /usr/share/n