Welcome! Log In Create A New Profile

Advanced

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Maxim Dounin
March 22, 2009 02:08PM
<49C62A0E.1040707@e-healthexpert.org>

Hello!

On Sun, Mar 22, 2009 at 12:07:42PM +0000, Mark Alan wrote:

> In Debian/Ubuntu systems (also in .rpm based systems?) /conf.d/*.conf
> files are used to (automatically) supersede any configuration originally
> put in the main .conf file (nginx.conf) by the program
> developers/maintainers.
>
> In the file /etc/nginx/nginx.conf (or
> /usr/local/nginx/conf/nginx.conf, if installed from source) there is
> supposed to that, loading alternative config files: include
> /etc/nginx/conf.d/*.conf;
>
> In nginx-0.7.43 creating a file at .../conf.d/my_own.conf with the
> contents:
> keepalive_timeout 10 10;
> gzip on;
> gzip_types text/plain text/css application/x-javascript text/xml
> application/xml application/xml+rss text/javascript;
> gzip_min_length 640;
>
> Will lead, when trying to restart nginx, to a nginx halt with an error
> message like:
> " [emerg] 9242#0: "keepalive_timeout" directive is duplicate in
> /etc/nginx/conf.d/server_specific_parameters.conf:1
> "
>
> In the absence of a better opinion, it seems that it would make more
> sense if, instead, the new values superseed any already existant
> parameters in nginx.conf and nginx give the user a warning message
> listing the parameters being superseeded.
> Ideally any 20-my_own.conf file would be read after and superseed any
> values in a 10-my_own.conf file, wich in turn would be read after and
> superseed any values in nginx.conf
>
> Regarding any new parameters not present in any previous *.conf, nginx
> would simply read and add them without any further warning.

This is not bug, it's by design. And this allows to catch obvious
configuration errors easily - without even breaking working setup,
since nginx master process will refuse to reload configuration
with bugs (and hence old worker processes with correct
configuration will continue to serve requests).

Also I should say that debian default config layout for nginx is
rather bad, since it provokes many configuration bugs. Some of
them are easy to find thanks to duplication checks, but some are
really hard to find.

Maxim Dounin
Subject Author Posted

Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Mark Alan March 22, 2009 08:38AM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Maxim Dounin March 22, 2009 02:08PM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Mark Alan March 23, 2009 05:32AM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Merlin March 23, 2009 02:20PM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Mark Alan March 23, 2009 04:53PM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Igor Sysoev March 23, 2009 04:58PM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Igor Sysoev March 23, 2009 04:58PM

Re: Bug in the nginx-0.7.xx include .../conf.d/*.conf process ?

Merlin March 23, 2009 05:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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