I'll do my best to explain the issue (Note: I see the same behavior from CiviCRM - it does not recognize the SSL either)
When I use the setup page (/admin/settings/securepages) to establish the base URL's for HTTP & HTTPS, the setting to "Enable Secure Pages" is locked to "Disabled", even when I hit the page from an HTTPS base URL.
My host does not put the SSL Cert in CPanel, but because they are a clustered hosting solution they have the SSL on the edge load balancers. Here is a excerpt from a support email to me from my hosting provider:
In cPanel, you will not see anything regarding SSL as that is not where its installed, we have a cluster of servers so your certificate is actually on our edge load balancers.
Our edge system inserts a cookie called HTTP_SECURE, your application
We have added the below code to your .htaccess, which we hope will resolve your issue, please let us know if this is suitable.RewriteCond %{HTTP_SECURE} ^YES$
RewriteRule ^(.*)$ $1 [E=HTTPS:ON,E=SERVER_PORT:443]
I confess that I do not know enough of how Drupal and these modules might look to check for HTTPS, except to say that it's probably in the PHP.INI somewhere.
I am attempting to migrate my business to a "clustered" solution, one that eases the memory limits and speed constraints of the traditional hosting solutions, therefore, I hope that there is a solution for this challenge. Thanks for reading this, and for any advice.
jgaryt
Comments
Comment #1
jgaryt commentedA subsequent email from my hosting provider stated the following:
And it did indeed fix the Secure Pages module, but it did not fix the CiviCRM module issue, so it's not a cure-all. Any further input would be valued.
Jgaryt
Comment #2
mrfelton commentedI too have this probem Although I am running with Nginx and not Apache.
Comment #3
gordon commentedBasically the problem is the $_SERVER['HTTPS'] is not being set to 'on'. If PHP don't know that it is secure mode then it will secure pages will not know.
Basically do a phpinfo() from a secure page and see what you get. What indicates that the page is currently in secure mode.
Comment #4
wqmeng commentedIf you are on Nginx, Then add the little code in your Nginx conf file.
fastcgi_param HTTPS on;Here is all the code in my host conf at the php section.
Reload your nginx server, then you may get the enable box active.
Comment #5
mrfelton commentedwas just about to say the same... thats what I do and it works for me.
Comment #6
gordon commentedI have added it to a new FAQ.txt file with reference to this.
Gordon.