Welcome! Log In Create A New Profile

Advanced

Re: Is that possible to define a common location handler for all servers

August 30, 2011 01:26AM
On Mon, Aug 29, 2011 at 10:19:30PM -0700, Qun-Ying wrote:
> Hi,
>
> Let's say we have a sample configuration:
>
> http {
> server {
> server_name "server1"
> }
>
> server {
> server_name "server2"
> }
> ..
> }
>
> Is that possible to define a single location entry (not using the include
> directive, which actually defined the entry for each server after include
> expand)
> location /error {
> error_handler
> }
> So that it could be use in all servers?
>
> I try to define it at http level, but encounter error saying location could
> not be defined outside server.

It's not possible.


--
Igor Sysoev

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

Is that possible to define a common location handler for all servers

Qun-Ying 2902 August 30, 2011 01:20AM

Re: Is that possible to define a common location handler for all servers

Igor Sysoev 1260 August 30, 2011 01:26AM



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

Online Users

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