I've come across an issue I haven't seen before and am really scratching my head. We have a basic wordpress site running on a WHM/cpanel(for configuration) hosted platform. We have an SSL certificate installed. 2 days ago, something changed with the server configuration that every one swears they didn't change(ha).
So every time we went to the wp-admin, we kept getting a redirect loop. After tracing the redirect down, it turns out that it is checking the php superglobal $_SERVER['HTTPS'] for a value of on. After that I dumped out the values of the superglobal and sure enough, no HTTPS value at all. I added the value in the wp-config.php and everything started working again. However, the certificate in the browser is perfectly fine.
Obviously this is a bad solution and not viable in the long run, but I'm not 100% sure why it's doing this. we have many sites hosted on the whm and each is assigned a port starting at 80 and 443 and adding 1 to the port for each site. The vhost entry for this one is listening on 444 and 81. I have to assume this is configured correctly by whm as it is autogenerated and seemingly worked before. What else can I check to determine why https is seen as off by php, but a perfectly valid certificate is loading up just fine in the browser? If the connection is secure, but php is off, does this harm anything by telling it its on until I can get this fixed? I think it should be fine because, logically speaking, the request is encrypted. php just initiates it, and apache is securing the request. Any advice is greatly appreciated!