Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Force SSL for cPanel?

Discussion in 'Security' started by Gm Prodigy, May 8, 2018.

  1. Gm Prodigy

    Gm Prodigy Registered

    Joined:
    May 8, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    uk
    cPanel Access Level:
    Website Owner
    I've set up a forum and got the force ssl for my site working by using

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    </IfModule>

    It also forces ssl for subdomains created by me. The only problem I have is that it doesn't work for cpanel.example.com. all of my subdomains has forced ssl but the cpanel subdomain doesn't. Any thoughts on this? 2018-05-08 (1)_LI.jpg
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    266
    Likes Received:
    19
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,758
    Likes Received:
    79
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    The code that you are using is for the account specific and is used in the .htaccess of the particular account and this .htaccess may not override the global configuration set for proxy subdomains. You will have to change the proxy subdomain behavior from the tweak settings section only..
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    836
    Likes Received:
    62
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Both of the responses to this are exactly what I would suggest as well. Please let us know if you continue to have issues with the proxy subdomains over SSL. You'll want to ensure the following are set to on in WHM>>Server Configuration>>Tweak Settings:

     
Loading...

Share This Page