<div dir="ltr"><div>I am trying to check the contents of an html file on upstream servers. A configuration using HTTP works. However, using the same check with HTTPS does not work.</div><div><br></div><div>nginx version: nginx/1.19.0 (nginx-plus-r22)</div><div><br></div><div>Upstreams are IIS.<br></div><div><br></div><div>Non working config:</div><div>log_format upstreamlog-giscrp '$server_name to: $upstream_addr [$request] '<br> 'upstream_response_time $upstream_response_time '<br> 'msec $msec request_time $request_time';<br><br> match giscrp_up {<br> body ~* "IISUP";<br> }<br><br> upstream giscrp {<br> server <a href="http://10.212.226.58:443" target="_blank">10.212.226.58:443</a>;<br> server <a href="http://10.212.226.59:443" target="_blank">10.212.226.59:443</a>;<br> zone map 64k;<br> }<br><br> server {<br> listen 443 ssl http2;<br><br> server_name <a href="http://giscrp.vt911.net" target="_blank">giscrp.vt911.net</a>;<br><br><br> ssl_certificate /etc/pki/tls/certs/<a href="http://vt911.net/STAR_vt911_net-bundle.crt" target="_blank">vt911.net/STAR_vt911_net-bundle.crt</a>;<br> ssl_certificate_key /etc/pki/tls/certs/<a href="http://vt911.net/STAR_vt911.net.key" target="_blank">vt911.net/STAR_vt911.net.key</a>;<br> access_log /var/log/nginx/access-giscrp.log upstreamlog-giscrp;<br><br><br> #proxy_ssl on;<br><br><br><br> location / {<br> proxy_set_header X-Forwarded-For $remote_addr; #Passes client IP to upstream web server<br> proxy_set_header Host $http_host; #Passes request hostname from client in header<br> proxy_set_header X-Forwarded-Proto $scheme;</div><div>
proxy_http_version 1.1;
</div><div> proxy_pass <a href="https://giscrp" target="_blank">https://giscrp</a>;<br> health_check match=giscrp_up uri=/iisstatus.html;<br> }<br> }</div><div><br></div><div><br></div><div>Working config over HTTP:</div><div>log_format upstreamlog-map '$server_name to: $upstream_addr [$request] '<br> 'upstream_response_time $upstream_response_time '<br> 'msec $msec request_time $request_time';<br> match iis_up {<br> body ~ "IISUP";<br> }<br><br> server {<br> listen 80;<br> server_name <a href="http://map.vt911.net" target="_blank">map.vt911.net</a>;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br> access_log /var/log/nginx/access-map.log upstreamlog-map;<br><br> location / {<br> proxy_pass <a href="http://map.vt911.net" target="_blank">http://map.vt911.net</a>;<br> proxy_set_header X-Forwarded-For $remote_addr;<br> proxy_http_version 1.1;<br> proxy_set_header Connection "";<br> health_check match=iis_up uri=/iisstatus.html;<br> }<br> }<br><br> upstream <a href="http://map.vt911.net" target="_blank">map.vt911.net</a> {<br> server <a href="http://10.212.224.56:80" target="_blank">10.212.224.56:80</a>;<br> server <a href="http://10.212.224.57:80" target="_blank">10.212.224.57:80</a>;<br> zone map 64k;<br> }</div><div><br></div><div>I am not sure if the health check is sending the request to the IP instead of the FQDN and the server is rejecting it or something.<br></div><div><br></div><div>Any ideas would be appreciated.</div><div><br></div><div>-- <br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Jeff Creek<br></div>INdigital<br></div></div></div></div></div></div></div></div>