We have an nginx server that we're using as a reverse proxy. We redirect every HTTP traffic to HTTPS, except a specific path - /success.html. The mechanism works at first, but after a while (few hours / days), the /success.html location stops working and times out. The other location (/) keeps working well. After reloading the nginx, things return to normal (until next time...).
Our conf file:
server {
listen 80;
server_name mypublicdomain.com;
location /success.html {
proxy_pass http://myinternaldomain.net/success.html;
}
location / {
return 301 https://mypublicdomain.com$request_uri;
}
}
server {
listen 443 ssl http2;
server_name mypublicdomain.com;
...
...
}
What are we doing wrong here? We've seen similar issues when putting more than one location on the same server (with one location being more specific that the other).
proxy_passtime out? Is it possible that themyinternaldomain.netIP address is changing? – Richard Smith Jul 29 '18 at 08:48resolver, and putmyinternaldomain.netas a variable. – nozik Jul 30 '18 at 17:29