Eu faria algo assim (testado com o nginx 1.4.2, parece funcionar):
server {
listen 127.0.0.1:443 ssl;
server_name site1.example.com;
include common.conf;
location / {
proxy_pass http://127.0.0.2:8081;
}
}
server {
listen 127.0.0.1:443 ssl;
server_name site2.example.com;
include common.conf;
location / {
proxy_pass http://127.0.0.2:8082;
}
}
server {
listen 127.0.0.1:443 ssl;
server_name site3.example.com;
include common.conf;
location / {
proxy_pass http://127.0.0.3:8083;
}
}
Com pelo menos isso em common.conf
:
ssl on;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;