How to set nginx reverse proxy to an SSL site without certificate?
First you need to change in your hosts
file (or your DNS if you have access to your DNS server configuration) and add an entry similar with:
whatismyip.com 192.168.1.10
Or for DNS:
whatismyip.com IN A 192.168.1.10
Where 192.168.1.10
is the IP where Nginx is listening. In the browser us https://whatismyip.com not with the IP.
The config should use a hostname, because the whatismyip.com's IP address might change:
stream {
upstream web_server {
server whatismyip.com:443;
}
server {
listen 443;
ssl_preread on;
proxy_pass web_server;
}
}