[CPANEL-27774] Force HTTPS option disabled and cannot be enabled

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello @RonanRBR,

Can you open a support ticket so we can look at your system to see why the FORCE HTTPS REDIRECT toggle in cPanel >> Domains is not available? You can post the ticket number here and we'll link this thread to it.

Thank you.
 

RonanRBR

Member
Aug 11, 2014
18
3
53
Fortaleza, Ceara, Brazil
cPanel Access Level
Root Administrator
I am facing the exact issue. Did anyone find any solution? (using whm/cpanel 80.0.15 with SSL certificate from AutoSSL)
In my case I needed to open a ticket, my problem was a custom Apache configuration file. Then support applied a patch path to restore the default configuration file.
Unfortunately, I think you need to open a support tcket, or try to manually restore the apache configuration files, but I do not recommend the second one.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello Everyone,

Internal case CPANEL-27774 is open to address an issue where the specific reason why the Force HTTPS Redirect option is disabled in the cPanel UI. I'll monitor this case and update this thread with more information on it's status as it becomes available.

In the meantime, here's a look at the potential reasons the Force HTTPS Redirect option is disabled in the cPanel UI:

1. The ea-apache24-config-runtime version is lower than 1.0-140. Here's an example of how to check the version of this RPM:

Code:
rpm -qa|grep ea-apache24-config-runtime
If you're using a lower version, run the "yum update" command to ensure you are using the latest EA4 RPMs.

2. The Allow cPanel users to install SSL Hosts option is disabled under the System tab in WHM >> Tweak Settings.

3. Mod_Rewrite is not installed. Here's the command to use to confirm that Mod_Rewrite is installed:

Code:
httpd -M|grep rewrite
If it's installed, the command output should look like this:

Code:
# httpd -M|grep rewrite
 rewrite_module (shared)
4. Custom Apache templates are overriding the the vhost.default Apache template. You can read about how custom Apache templates are configured on the link below:

Custom Templates - EasyApache 4 - cPanel Documentation

Thank you.
 

samedwards

Registered
Mar 13, 2017
1
0
1
Victoria, BC
cPanel Access Level
DataCenter Provider
Custom Apache templates are overriding the the vhost.default Apache template.
This seems pretty heavy-handed. As you mentioned, there's a known version of ea-apache24-config-runtime that contains the correct config to enable this functionality. There's already code that checks the last modified date on custom templates to send a notification if the default versions are updated... all this together seems like there's an easy solution here. Heck, the template could even be searched for the correct config. As an outside alternative, there could even be a feature flag file to touch to enable this feature when custom templates are present.

Can this request be folded in to this case, or should I open another one?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
there's a known version of ea-apache24-config-runtime that contains the correct config to enable this functionality. There's already code that checks the last modified date on custom templates to send a notification if the default versions are updated... all this together seems like there's an easy solution here. Heck, the template could even be searched for the correct config. As an outside alternative, there could even be a feature flag file to touch to enable this feature when custom templates are present.

Can this request be folded in to this case, or should I open another one?
Hello @samedwards,

This feedback is more suitable for our feature request website. Here's the format we recommend using when creating a feature request to ensure your feedback gets as much visibility as possible and translates into actionable work:

As a {cPanel User, System Administrator, web-hosting provider, or any other user perspective}, I would like {the feature that is being requested} so that {benefit that the request adds to the product}.
Feel free to respond here with a link to the feature request upon approval, or let me know if you have any questions about how to format the request.

Thank you.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hello,

I just wanted to update that the internal case associated with this issue was marked as done due to being unable to be replicated. Looking back through the thread it appears there was custom templates involved that created the complication. If you are still experiencing this issue and you have not made customizations to the apache server please provide detailed replication steps.
 

zikridaud

Registered
Apr 10, 2020
1
0
1
Malaysia
cPanel Access Level
Reseller Owner
Hello,

I just wanted to update that the internal case associated with this issue was marked as done due to being unable to be replicated. Looking back through the thread it appears there was custom templates involved that created the complication. If you are still experiencing this issue and you have not made customizations to the apache server please provide detailed replication steps.
Hi, I have the same issue here. Can you advice what I should do?
Thank you.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Please see the last response:

Hello,

I just wanted to update that the internal case associated with this issue was marked as done due to being unable to be replicated. Looking back through the thread it appears there was custom templates involved that created the complication. If you are still experiencing this issue and you have not made customizations to the apache server please provide detailed replication steps.
 

sparek-3

Well-Known Member
Aug 10, 2002
2,148
265
388
cPanel Access Level
Root Administrator
Came across this "feature" that I didn't even know about in end-user's cPanels but found it was grayed out. Found this thread, even though it's slightly outdated I thought it was still pertinent.

2. The Allow cPanel users to install SSL Hosts option is disabled under the System tab in WHM >> Tweak Settings.
Why?

I mean... I get and understand that you shouldn't be able to force redirect to HTTPS without a valid certificate. But why is redirecting predicated on the end-user having the ability to install their own certificate? What's the thought process in this requirement?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
There is actually a case open on this - I just checked into it too CPANEL-33234. It's my personal belief that you should not have to allow your users the ability to install SSL hosts in order to force redirection to https.