This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

I have the following two server directives setup by including conf.d/*.conf. When I navigate to the server via the public, external IP address it seems to match the server for 127.0.0.1 as an entry is added to the localhost.access_log file. I expected this to only happen when accessing via localhost. From an external IP I expected to match the .host.tld server_name directive or the default_server parameter.

Do I need to ensure an order to how the conf files are loaded? Why would the listen on 127.0.0.1 be matched in this way? Is it the second location directive that is empty?