1

I have setup Nginx as a reverse proxy listening to the 443 port for several blogs. I'd like to have Nginx pass a specific sub-domain to Stunnel to have a less-detectable VPN as shown below. Server port 443 setup

Is it possible to make Nginx redirect a sub-domain, regardless of the SSL, without interfering with Stunnel's encapsulation? I'm not sure the configuration below would work properly. Or should I use another setup?

server {
    listen 443;
    listen [::]:443;
    server_name sub.primary.tld;

    location / {
        proxy_pass http://127.0.0.1:1995/;
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;
    }
}
Maxithi
  • 111

0 Answers0