Redirect HTTP to HTTPS in VestaCP?

djsmiley2k

Well-known member
Joined
Jul 10, 2016
Messages
120
Best answers
0
Ratings
5
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
251
Best answers
0
Ratings
72 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
9
Views
70
Replies
6
Views
42
fwh
Replies
2
Views
33
Replies
2
Views
34
Recommended Threads
Replies
12
Views
1,428
Replies
3
Views
625
Replies
19
Views
1,841

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