We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
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..
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: How do I redirect all traffic to the https:// domain?
You can do this in htaccess.
https://stackoverflow.com/questions/104 ... h-htaccess
https://stackoverflow.com/questions/104 ... h-htaccess
Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]