I've got securepages set up, and enabled, and have a specific set of pages to be secured. My base URLs are correct, and the site responds to both http and https just fine (https pages are secure). I'm running nginx, and the nginx configurations all seem correct.
The thing that does not work is pages do not automatically switch from http to https. For example, I've got 'admin' and 'admin/*' set to be secured. But if I navigate to an admin page, I'm still in http (not https). I've tried everything I can imagine (short of stepping through the secure pages code) and can't figure this out. One thing that sort of worked was to have by base-url in the settings.php file to be https://my.domain.com. But this is not a good solution since it loads all my images as https every time.
I'm sure there must be something in the configuration I'm doing wrong, but can't seem to figure out what. Any suggestions would be greatly appreciated - I'm just completely at a loss as to what's going on with this!
Comments
Comment #1
cybertoast commentedThis turned out to be an nginx configuration issue. The PHP_SELF option was not being set in $_SERVER. The reason is that I did not have the appropriate include line in nginx.conf.
The solution with this was to configure my nginx as follows:
(Found the solution thanks to TheHungryCoder's post).
Comment #2
sanduhrsThanks for documenting.
Comment #4
ahmed.sajid commentedHi,
I am having a similar issue, but I am using apache + linux.
Can you suggest any solutions?
Thanks,
Ahmed.