I'm building a proxy for an internal API to allow clients to connect without having to have the self-signed certificates installed.
Clients (built, owned and used only internally) will connect over SSL to the nginx box, where I'm using XSendfile to validate credentials at the application level (a rails app). If the credentials are valid, the connection is passed back up to nginx where it uses proxy_pass to send the connection onto the upstream server.
Now this works great for standard http connections, but I'm trying to figure out how to add our certificates into the mix.
This question is almost identical to this one, but with awkward certificate requirements.
Is this even possible with nginx? Is there a better solution?
I'd also settle for http from client -> nginx, and self-signed certificate from nginx to the API.
proxy_ssl_server_name on;was all I needed to get this working when proxying traffic to a host on Google App Engine using its built-in Google-managed SSL! (This isn't a self-signed cert or anything, so it just needed that one line). Thanks for the great tip. – XP84 Sep 09 '18 at 05:29proxy_ssl_server_name on;as well as @XP84 for singling that out. It was really helpful! – Alexander Nov 06 '23 at 06:24proxy_ssl_verify offand be done, and nobody looking at it later will be misled into thinking it's actually checking anything. – Mark Feb 27 '26 at 17:52