4

In CentOS I installed nginx version 1.6.3 and it came with a default config file that defines a server for port 80. I put my config file in conf.d/ but I couldn't find a way to override the default config other than modifying nginx.conf.

Is there a way to override or disable the default server on port 80 without modifying nginx.conf?

allprog
  • 141
  • 1
  • 4

1 Answers1

1

It's possible to define another main config file without modify the original nginx.conf.

/usr/sbin/nginx -t -c /etc/nginx/custom.conf
  • 1
    This would be practically the same as modifying the original config. But thanks, I do this, actually. It just hardly makes sense to me that the default config contains any site setup at all. – allprog Aug 08 '16 at 11:04
  • Yes it could be confusing. Apache Httpd has also a default virtualhost with the message "It works!". – Christophe Morio Aug 09 '16 at 20:48