--conf-path does not work
nginx-forum at nginx.us
Mon May 4 19:30:12 MSD 2009
> Linux test 2.6.18-53.el5 #1 SMP Wed Oct 10
> 16:34:19 EDT 2007 x86_64 x86_64
> x86_64 GNU/Linux
> 2009/5/4 Jim Ohlstein
> > ./configure --conf-path=PATH
> >> does not work
> > I'm sure it will help if you tell Igor what
> version you are running, what
> > platform you are running it on, what other
> configure options you used, and
> > what exactly happens.
I can confirm that there appears to be a bug or three.
I am running Linux 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:10:25 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
I was running nginx 0.7.53 but configured 06.36 with
# ./configure ---conf-path=/etc/nginx
It compiled properly but after running make install, nginv -V still showed that 0.7.53 was installed with my old configure options. Further, make install copied the config files to /etc, not to /etc/nginx. I then tried to copy objs/nginx to /usr/local/sbin and got an error:
# cp objs/nginx /usr/local/sbin
cp: overwrite `/usr/local/sbin/nginx'? y
cp: cannot create regular file `/usr/local/sbin/nginx': Text file busy
I stopped nginx and was able to copy the file and confirmed that now nginx -V showed
# nginx -V
nginx version: nginx/0.6.36
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: --conf-path=/etc/nginx
but...etc/nginx, which I had created, was empty. The files were in /etc.
I tried the same with
# ./configure ---conf-path=/etc/nginx/etc
This time the config files were copied to /etc/nginx.
Again, make install failed to install the new binary so I did it manually again, and also manually copied the config files to /etc/nginx/etc.
Starting nginx it was clear that it was not using /etc/nginx/nginx.conf or /etc/nginx/etc/nginx.conf, but was reading /usr/local/nginx/conf/nginx.conf. I had different numbers of workers in each so I am certain.
I tired running configure with a trailing slash at the end of the path and nothing changed. The config files were installed one level up and the binary was not installed. Starting nginx always resulted in it reading nginx.conf from the default location.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,1713,1745#msg-1745
More information about the nginx