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 to force SSL for one domain?

General questions about VestaCP
Post Reply
  • Print view
Advanced search
13 posts
  • Previous
  • 1
  • 2
dkyadav008
Posts: 3
Joined: Wed Jul 12, 2017 7:13 pm

Re: How to force SSL for one domain?
  • Quote

Post by dkyadav008 » Mon Jul 17, 2017 6:08 pm

thank you skurudo for the template solution.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: How to force SSL for one domain?
  • Quote

Post by skurudo » Tue Jul 18, 2017 12:31 pm

You're welcome! ;-)
Top

Szektor
Posts: 7
Joined: Sun Feb 02, 2020 1:49 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: How to force SSL for one domain?
  • Quote

Post by Szektor » Sun Feb 02, 2020 1:55 pm

I believe a %{HTTPS} variable is missing on the system.

If I use the following (it works on any other server):

Code: Select all

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
Here it redirects even after it reaches https://anything

This would be useful for Vesta team.
Top


Post Reply
  • Print view

13 posts
  • Previous
  • 1
  • 2

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