Last active
February 13, 2019 10:42
-
-
Save erdii/6da155df9c14f9f9e27af42d37c91532 to your computer and use it in GitHub Desktop.
nginx proxy request to HTTPS SNI upstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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