Answer the question
In order to leave comments, you need to log in
redirect to nginx
Hello.
It is necessary to implement the following: when a certain page is requested, nginx pulls the script. If the script fails (due to an error, timeout, or any other reason, it didn't work as it should), nginx should return some other page.
Any ideas?
Answer the question
In order to leave comments, you need to log in
You need to use a named location:
location… {
error_page 404 502 504 = @errorlocation;
}
location @errorlocation {
}
Documentation:
sysoev.ru/nginx/docs/http/ngx_http_core_module.html#location
I think it's worth looking in the direction of pages for 500 errors.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question