In the Context of Nginx, What Is the Difference between the default.conf and nginx.conf Files?

Question
In the Context of Nginx, What Is the Difference between the default.conf and nginx.conf Files?

Answer
For general Nginx purposes, the nginx.conf file specifies the location of the Nginx logs and the names of the log files themselves.  

For general Nginx purposes, the default.conf handles many more configuration items than nginx.conf.   The default.conf file will allow you to configure a non-standard port (other than port 80) and specifies if Nginx will act as a load balancer or a web server.  If you choose to configure the Nginx deployment as an HTTP load balancer (distributing incoming connections to backend web servers), this default.conf file will allow you to configure how the traffic is distributed.  If you configure Nginx to be a web server, the location of the index.html file can be configured with default.conf.

Leave a comment

Your email address will not be published. Required fields are marked *