Welcome! Log In Create A New Profile

Advanced

Re: --conf-path does not work

May 04, 2009 11:30AM
陈昌茂 Wrote:
-------------------------------------------------------
> nginx-0.6.36
>
> 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
>
> Thanks.
>
> 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.

--
Jim Ohlstein
Subject Author Posted

--conf-path does not work

陈昌茂 May 03, 2009 05:57AM

Re: --conf-path does not work

Jim Ohlstein May 03, 2009 04:20PM

Re: --conf-path does not work

陈昌茂 May 04, 2009 10:01AM

Re: --conf-path does not work

Jim Ohlstein May 04, 2009 11:30AM

Re: --conf-path does not work

Igor Sysoev May 04, 2009 11:40AM

Re: --conf-path does not work

Jim Ohlstein May 04, 2009 11:55AM

Re: --conf-path does not work

Igor Sysoev May 04, 2009 02:53PM

Re: --conf-path does not work

Jim Ohlstein May 04, 2009 04:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready