<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">Hey guys,</p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><br></p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">I am trying to get the following setup running:</p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">Nginx is listening to port 443. According to the users host (SNI), it should route the SSL requests to a upstream daemon / host which will take care of SSL certification, handshake and so on.</p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><br></p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">Nginx should not touch the request, just pass it. </p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">Since SSL also encrypts the header, it makes this setup a little bit more difficult than expected. A hint on serverfault indicated that SNI might be useful for this?</p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><br></p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">My current experiment:</p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><br></p><p id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><p id="bloop_customfont" style="margin: 0px; ">server { listen 443; server_name example01.com; location / { proxy_set_header Host $http_host; proxy_pass https://127.0.0.1:8001; } }</p><p id="bloop_customfont" style="margin: 0px; ">server { listen 443; server_name example02.com; location / { proxy_set_header Host $http_host; proxy_pass https://127.0.0.1:8002; } }</p><p id="bloop_customfont" style="margin: 0px; ">server { listen 443; server_name example03.com; location / { proxy_set_header Host $http_host; proxy_pass https://127.0.0.1:8003; } }</p><p id="bloop_customfont" style="margin: 0px; ">server { listen 443; server_name example04.com; location / { proxy_set_header Host $http_host; proxy_pass https://127.0.0.1:8004; } }</p><p id="bloop_customfont" style="margin: 0px; "><br></p><p id="bloop_customfont" style="margin: 0px; ">However, this doesn't seem to work.</p><p id="bloop_customfont" style="margin: 0px; "><br></p><p id="bloop_customfont" style="margin: 0px; ">Any ideas on this?</p><p id="bloop_customfont" style="margin: 0px; "><br></p><p id="bloop_customfont" style="margin: 0px; "><br></p><p id="bloop_customfont" style="margin: 0px; ">Cheers,</p><p id="bloop_customfont" style="margin: 0px; ">David</p></p><div class="" id="bloop_sign_1371958264196512000"><span style="font-family:helvetica,arial;font-size:13px"></span><span></span></div></body></html>