# Prevent Nginx from leaking other server configurations on the same machine
if ($host != $server_name) {
return 444;
}
All configuration files contain this block. nginx documentation recommends to avoid if blocks whenever possible, because if is evil.
I guess the same functionality could also be achieved by creating a server block which is included before any of the conf.d/* files. What do you think?
All configuration files contain this block.
nginx
documentation recommends to avoidif
blocks whenever possible, becauseif
is evil.I guess the same functionality could also be achieved by creating a
server
block which is included before any of theconf.d/*
files. What do you think?