Page 1 of 1

Vesta+Nginx+Cloudlare Cname to SSL port

Posted: Sun Sep 05, 2021 10:22 am
by sharkstate
I run Vesta on Centos with Nginx ticked from the installation of Vesta and also using Cloudflare.

Trying to get my head around how to through Nginx forward a cname subdomain to a specific port using ssl.

Ive tried

Code: Select all

sudo nano /home/[username]/conf/web/[domain.com].nginx.ssl.conf
adding to that after the initital

Code: Select all

server {
:

server {
listen [ipaddress]:443 ssl;
server_name sub.[domain].com;
ssl_certificate /home/[username]/conf/web/ssl.[domain].com.pem;
ssl_certificate_key /home/[username]/conf/web/ssl.[domain].com.key;
location / {
proxy_pass https://[ipaddress]:2053;
}
}

This is clearly not correct and it breaks the server. Thanks for any pointers!