How do I redirect all traffic to the https:// domain?
How do I redirect all traffic to the https:// domain?
Hey guys,
I've setup Vesta and added SSL support for all domains with Let's Encrypt. When manually typing https://domain.com it'll show the site with SSL turned on, but when I just type domain.com it'll always navigate to the non-SSL http:// variant.
How do I make all traffic, per domain or all domains all together (since all domains will have SSL) go automatically to https://domain.com ?
I already googled and saw lots of suggestions, including server {} blocks, which I pasted within the http {} part in the /etc/nginx/nginx.conf file and restarted the server, but that didn't change a thing..
I've setup Vesta and added SSL support for all domains with Let's Encrypt. When manually typing https://domain.com it'll show the site with SSL turned on, but when I just type domain.com it'll always navigate to the non-SSL http:// variant.
How do I make all traffic, per domain or all domains all together (since all domains will have SSL) go automatically to https://domain.com ?
I already googled and saw lots of suggestions, including server {} blocks, which I pasted within the http {} part in the /etc/nginx/nginx.conf file and restarted the server, but that didn't change a thing..
Re: How do I redirect all traffic to the https:// domain?
Post is older but doc is actual.
After step 2, there're in /usr/local/vesta/data/templates/web/nginx/ two new files, force-https.stpl and force-https.tpl
Step 3 create a package or force-https no work using any template named force-https
Any template named force-htpps on VestaCP interface, in new template or on domain for apply new template.
What is wrong?
I'm using vestaCp 0.9.8 Release 26
Well...How to force https/SSL on a domain
1. Install custom nginx template3. Create new package or set force-https as nginx template in the existing packageCode: Select all
cd /usr/local/vesta/data/templates/web wget http://c.vestacp.com/0.9.8/rhel/force-https/nginx.tar.gz tar -xzvf nginx.tar.gz rm -f nginx.tar.gz
4. Add new user and assing him package with force-https template
5. Add new domain with SSL certificate and check the result
After step 2, there're in /usr/local/vesta/data/templates/web/nginx/ two new files, force-https.stpl and force-https.tpl
Step 3 create a package or force-https no work using any template named force-https
Any template named force-htpps on VestaCP interface, in new template or on domain for apply new template.
What is wrong?
I'm using vestaCp 0.9.8 Release 26