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?

1 Answer 1

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
2
  • 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 8, 2016 at 11:04
  • Yes it could be confusing. Apache Httpd has also a default virtualhost with the message "It works!". Aug 9, 2016 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .