Welcome! Log In Create A New Profile

Advanced

Multiple nginx.conf files - how do choose?

Posted by gerantabee 
Multiple nginx.conf files - how do choose?
March 08, 2014 09:42PM
I compiled nginx from source on Ubuntu 13.* as this is my first foray into NGINX. Once i got the server successfully up and running, I had troubles getting it to obey server contexts for a site I already had setup on the server (which was previously running under apache).

I originally modified a file cat /etc/nginx/nginx.conf which DID NOT affect server behavior. AFter reading some additional forums I located an additional nginx.conf file at:
/usr/local/nginx/conf/nginx.conf. Adding the server contexts to this helped. However, I'm wondering what the one under etc/nginx is, and noticed that there are also standalone serve context type files located in /etc/nginx/sites-available and sites-default (much like apache), but i edited these before the one at /usr/local and they didn't work either.

Can someone tell me what the best practice is for defining configuration, specifially server contexts, and why there are multiple locations/config files where this seems to be applicable? Again, the only one that affected server behavior seems to be the default one at /usr/local/nginx/conf/

Any insight from those more experienced would be very appreciated...



Edited 1 time(s). Last edit at 03/08/2014 09:43PM by gerantabee.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready