Answer the question
In order to leave comments, you need to log in
How to configure Nginx to do this?
Nginx acts as a proxy web server. It redirects all requests to the internal network web server. How can I make Nginx immediately indicate that the internal web server is unavailable if the user tries to type an address in the browser's address bar? Now I have to wait for Nginx to show a 502 error
Answer the question
In order to leave comments, you need to log in
For example, via the upstream
module :
upstream intraserver {
server internal-ip:port max_fails=2 fail_timeout=10;
server 127.0.0.2:8880 backup;
}
server {
listen 127.0.0.2:8880;
return 502;
}
server {
...
proxy_pass http://intraserver;
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question