Redirect HTTP to HTTPS in VestaCP?

djsmiley2k

Well-known member
Joined
Jul 10, 2016
Messages
149
Best answers
1
Ratings
8
Points
18
#1
I am having a VPS package and installed VestaCP control panel, it is new to me and I have less experience for using VestaCP. Can you tell me the way to redirect HTTP to HTTPS in VestaCP? Does it use same way as other hosting panels?
 

Localnode

Moderator
Staff Member
Joined
Dec 15, 2015
Messages
256
Best answers
1
Ratings
75 1
Points
28
#2
Why not use .htaccess? If your server is running Apache or Litespeed it's pretty simple:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Or redirect it including www.
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]   
</IfModule>
 

KnownHost-DanielP

Well-known member
Joined
Mar 1, 2018
Messages
121
Best answers
2
Ratings
27 3
Points
28
#3
I am having a VPS package and installed VestaCP control panel, it is new to me and I have less experience for using VestaCP. Can you tell me the way to redirect HTTP to HTTPS in VestaCP? Does it use same way as other hosting panels?
I'm not overly familiar with Vesta CP but it appears they have a Nginx template that forces https

https://vestacp.com/docs/#how-to-force-https

Might give that a shot.
 
Latest Threads
Replies
0
Views
3
Replies
0
Views
20
Replies
0
Views
5
Replies
0
Views
15

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top