Welcome! Log In Create A New Profile

Advanced

Re: Disallowing multiple http {} blocks in nginx.conf?

Maxim Dounin
October 10, 2013 04:22PM
Hello!

On Thu, Oct 10, 2013 at 12:46:03PM -0700, Yichun Zhang (agentzh) wrote:

> Hello guys!
>
> Some Nginx users use multiple http {} blocks in their nginx.conf, which
> causing issues because following http {} blocks override previous http
> modules' main_conf leading inconsistencies in calls
> like ngx_http_conf_get_module_main_conf
> and ngx_http_cycle_get_module_main_conf in global handler contexts like
> "post configuration" handlers.
>
> Do you think it is a good idea to simply disallow multiple http {} blocks
> in nginx.conf?

I don't thinks that it's a good idea to disallow configurations
with multiple http{} blocks. While this wasn't claimed to be
supported, it allows fun things like running multiple
configuration isolated, and e.g. makes merging configs from
multiple servers much easier.

AFAIR, as of now only one of standard modules has problems with
this - embeeded perl, and it has appropriate "caveat emptor"
clause in it's documentation.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

Disallowing multiple http {} blocks in nginx.conf?

Yichun Zhang (agentzh) 6291 October 10, 2013 03:48PM

Re: Disallowing multiple http {} blocks in nginx.conf?

Maxim Dounin 1767 October 10, 2013 04:22PM

Re: Disallowing multiple http {} blocks in nginx.conf?

Yichun Zhang (agentzh) 1303 October 10, 2013 05:40PM

Re: Disallowing multiple http {} blocks in nginx.conf?

Maxim Dounin 1465 October 10, 2013 06:32PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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