Score:0

NGINX How to try a url and return another source if failed

in flag

I am currently running an NGINX reverse proxy to another machine in a local network, if the endpoint of the proxy fails to respond (like timeout) I want to return a custom error page.html file that contains custom content

server{
    listen 80;
    server_name url.co;
    location / {
        proxy_pass 192.168.2.15;

        #here i want to catch if there is a timeout/no response and return an html file
    }
}
Michael Hampton avatar
cz flag
https://nginx.org/r/error_page
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.