Skip to content

Instantly share code, notes, and snippets.

@erdii
Last active February 13, 2019 10:42
Show Gist options
  • Save erdii/6da155df9c14f9f9e27af42d37c91532 to your computer and use it in GitHub Desktop.
Save erdii/6da155df9c14f9f9e27af42d37c91532 to your computer and use it in GitHub Desktop.
nginx proxy request to HTTPS SNI upstream
location /api {
# enable SNI
proxy_ssl_server_name on;
# you MUST set the host header seperately for SNI to work
proxy_set_header Host my-api.example.com;
# proxy requests to upstream server
proxy_pass https://my-api.example.com;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment