Welcome! Log In Create A New Profile

Advanced

Re: Does nginx support multiple http {} blocks?

Francis Daly
February 28, 2020 09:28AM
On Fri, Feb 28, 2020 at 10:22:21PM +0800, 2535191782 wrote:

Hi there,

> In nginx.conf:http{
>
>
> }
> http{
>
>
> }
> can be allowed?

It seems fairly easy to check.

$ sbin/nginx -t
nginx: [emerg] "http" directive is duplicate in /usr/local/nginx/conf/nginx.conf:8
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

So - no.

Is there a reason why you might want that? Perhaps the thing that you
want to achieve can be done some other way?

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Does nginx support multiple http {} blocks?

2535191782 February 28, 2020 09:24AM

Re: Does nginx support multiple http {} blocks?

Francis Daly February 28, 2020 09:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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