Configuration file of nginx


(徐徐浩) #1

what’s the differences between etc/nginx/conf.d/discourse.conf and etc/nginx/nginx.conf? Which one is the real nginx configuration file?


(Fábio Machado De Oliveira) #2

Both of them are real configuration files interpreted by nginx.

The etc/nginx/nginx.conf file is installed by Ubuntu nginx package. Inside this file there is a line with:

include /etc/nginx/conf.d/*.conf;

That instructs nginx to process additional configuration in all .conf files in the /etc/nginx/conf.d directory.

discourse.conf is all (or at least most of) configurations that were written by Discourse developers, unless they needed to change nginx.conf for some reason.