3 ms·
> did you know that if there is no Host header nginx serves the site evaluated first in its config file (even if the site has a server_name directive)? Before
by morelisp 3y ago
> did you know that if there is no Host header nginx serves the site evaluated first in its config file (even if the site has a server_name directive)?
Before that it goes to the one named "" and if that doesn't exist, the one with default_server.
If traffic with no Host header went to no server by default, people would also call that a footgun...
- Macha 3y agoSetting a server_name is something you need to opt into. So I feel it should be required to match to serve that vhost. If you didn't want it to apply only to the right vhost, don't configure it to require a specific vhost?