I'm struggling to figure out the meaning of each nginx configuration file located in different directories. So far I've found these directories/files related:
- /etc/nginx/nginx.conf - this is the main file that nginx will read. It also has several
include
directives to reference configurations defined in several other files. - /etc/nginx/conf.d/*.conf - in my default installation, there's one default.conf file at this location. Is this the one that I should go to edit if I want to, for example, add my own website?
- /etc/nginx/sites-available - Sometimes there's a file named 'default' here. What is this directory for and what's this configuration file? What's its relationship with the default.conf file under conf.d?
- /etc/nginx/sites-enabled - Another confusion. What's this directory then? And on my installation I see a symbolic link file pointing to the 'default' file in the sites-available directory. What's the point of doing this, separating into 2 directories but link them by some means?