Welcome! Log In Create A New Profile

Advanced

Re: Two little bugs

Maxim Dounin
December 08, 2010 12:46PM
Hello!

On Wed, Dec 08, 2010 at 05:29:07PM +0000, Mark Alan wrote:

> On Wed, 8 Dec 2010 17:04:40 +0100, "Piotr Sikora"
> <piotr.sikora@frickle.com> wrote:
> > > 2. using relative path fails:
> > > sudo nginx -c nginx.conf
> > > with error:
> > > [emerg]: open() "/usr/local/nginx/nginx.conf" failed (2: No such
> > > file or directory)
> >
> > It's supposed to fail.
>
> How come?
>
> I we have defined --conf-path=/etc/nginx/nginx.conf and that file
> exists at that place;
> I would expect that in case of any trouble at opening the
> config file stated in the command line,
> be it 'nginx -c nginx.conf' or 'nginx
> -c /whatever/path/anyfile-nginx.conf',
> nginx would try an [emerg]: open() "/etc/nginx/nginx.conf",
> not, as it is doing now, an [emerg]: open()
> "/usr/local/nginx/nginx.conf"

Relative path in -c is resolved from --prefix, that's why you see
"/usr/local/nginx/" + "nginx.conf".

Note that I don't argue if it breaks POLA or not, it's just how it
currently works. I personally think that paths in command line
arguments should be resolved from pwd.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Two little bugs

speedfirst December 07, 2010 01:45AM

Re: Two little bugs

Sergey A. Osokin December 07, 2010 02:12AM

Re: Two little bugs

Igor Sysoev December 07, 2010 02:42AM

Re: Two little bugs

speedfirst December 07, 2010 07:36PM

Re: Two little bugs

edogawaconan December 08, 2010 01:16AM

Re: Two little bugs

speedfirst December 08, 2010 08:52PM

Re: Two little bugs

Mark Alan December 08, 2010 10:56AM

Re: Two little bugs

Piotr Sikora December 08, 2010 11:14AM

Re: Two little bugs

Mark Alan December 08, 2010 12:34PM

Re: Two little bugs

Maxim Dounin December 08, 2010 12:46PM

Re: Two little bugs

Mark Alan December 08, 2010 02:04PM

Re: Two little bugs

Igor Sysoev December 08, 2010 03:46PM

Re: Two little bugs

Maxim Dounin December 08, 2010 04:36PM

Re: Two little bugs

Piotr Sikora December 08, 2010 12:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
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