nginx works with HTTP upstream, but when I change the proxy_pass to HTTPS it fails after few seconds with the following error:
root@websrv1:/etc/nginx/sites-enabled# nginx -t
nginx: [emerg] host not found in upstream "backend" in /etc/nginx/sites-
enabled/preprod-ssl.conf:30
nginx: configuration file /etc/nginx/nginx.conf test failed
Nginx config:
proxy_ssl_verify off;
proxy_pass https://backend;
proxy_ssl_trusted_certificate /etc/nginx/trusted-ssl/nginx.crt;
}
upstream backend {
server IP:PORT;
server IP:PORT;
}