Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx unable to match server_name if the server can not resolve the host

$
0
0
I have a server block with the following configuration:

server {
...

listen *:80;
server_name ~^query.+\.example.\com$;
...
}

If the server is unable to resolve hosts like query.dev.example.com (Unknown host), nginx will NOT match this host against the previous server block, and will execute the default server block.
So defining server names requires that the host specified can be resolved in the local server?

Thanks.
ER

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>