Posts tagged with apache

I ran into what is apparently a pretty common issue with users running PHP as some sort of CGI with the Nginx webserver. If you’re trying to detect whether a user is using SSL you normally check to see if $_SERVER['HTTPS'] == 'on'. Well apparently this is more of an Apache-only convention than I thought… It won’t work under Nginx, your PHP script will never see an HTTPS server value and will always think the connection is unencrypted (in my case with the SSL Admin plugin for Wordpress, resulting in an infinite loop back to the SSL version of the page).

Continue reading →