http {
...
set_real_ip_from 192.168.88.0/24; # IP-адреса вашего прокси-сервера
real_ip_header X-Real-IP;
...
}
map $ssl_preread_server_name $name {
site1.ru site1;
site2.ru site2;
}
upstream site1p80 {
server 192.168.88.231:80;
}
server {
listen 443 ssl;
server_name site1.ru site2.ru;
location / {
proxy_pass http://$name:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}