What im trying to do is have Nginx sit in the middle on a dedicated server and then when it sees a connection on
anything.(localport).vm.example.net
it passes the connection to 127.0.0.1:localport (http) and to 127.0.0.1:localport2 (https, the 2 is the diffrence)
I have it working for http. but for https i need to be able to let the server its passing the connection to set up the SSL.
here is my current nginx config
server {
listen 195.154.156.215:80;
server_name ~^(.[^\.]+)(\.)(\d+)\.vm\.example\.net$;
location / {
access_log off;
proxy_pass http://127.0.0.1:$3;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 501 502 503 /VM-Offline.html;
location = /VM-Offline.html {
root /var/www/html;
}
}