How does nginx determine the server to use when there is no default_server defined and it doesn't match server_name?
It was magically matching a server_name of localhost in the default sites-enabled file.
Firstly, I know i can specify default_server to force a default site, but I want to understand why nginx isn't simply picking the first defined server as documented.
At the end of the http section in nginx.conf I have
/etc/nginx/conf.d/*.conf is just some default proxy config and ssl config
Sites defined are
We are using nginx to serve static content and apache for dynamic content.
I have defined a default server configuration as:
#Set a default server that simply proxies all requests to apache
listen 80 default_server;
Is the the best way to proxy everything to apache if for some reason a ser