Locate the nginx.conf file my nginx is actually using

rgb picture rgb · Nov 11, 2013 · Viewed 111.5k times · Source

Working on a client's server where there are two different versions of nginx installed. I think one of them was installed with the brew package manager (its an osx box) and the other seems to have been compiled and installed with the nginx packaged Makefile. I searched for all of the nginx.conf files on the server, but none of these files define the parameters that nginx is actually using when I start it on the server. Where is the nginx.conf file that I'm unaware of?

Answer

Daniel Li picture Daniel Li · Nov 11, 2013

Running nginx -t through your commandline will issue out a test and append the output with the filepath to the configuration file (with either an error or success message).