Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

How do I redirect all traffic to the https:// domain?

General questions about VestaCP
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
Spythe
Posts: 9
Joined: Wed Jun 21, 2017 7:15 pm

How do I redirect all traffic to the https:// domain?
  • Quote

Post by Spythe » Thu Jun 22, 2017 10:18 am

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..
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: How do I redirect all traffic to the https:// domain?
  • Quote

Post by tjebbeke » Thu Jun 22, 2017 11:56 am

You can do this in htaccess.
https://stackoverflow.com/questions/104 ... h-htaccess

Code: Select all

RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password