Welcome! Log In Create A New Profile

Advanced

Re: error_page can not work in if directive

December 25, 2012 10:09AM
thank you very much, but i sitll want to know why error_page can't work normally in if block.
I see the error_page 's context can be " if in location" in the document.

the whole location conf like below, error_page can not work:

client_max_body_size 50k;
location / {
set $var "haha";
if ($var = "haha") {
error_page 413 /413.html;
}
}

but

client_max_body_size 50k;
location / {
error_page 413 /413.html;
}
it works!

and

location / {
set $var "haha";
if ($var = "haha") {
error_page 404 /404.html;
}
}

it also works!

thanks!
SubjectAuthorPosted

error_page can not work in if directive

xinghua_hiDecember 25, 2012 08:06AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 09:36AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 09:44AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 10:09AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 10:28AM

Re: error_page can not work in if directive

xinghua_hiDecember 25, 2012 11:47AM

Re: error_page can not work in if directive

Maxim DouninDecember 25, 2012 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready