Vesta+Nginx+Cloudlare Cname to SSL port
Posted: Sun Sep 05, 2021 10:22 am
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
adding to that after the initital :
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!
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
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!