Created
March 22, 2011 22:08
-
-
Save baylisscg/882190 to your computer and use it in GitHub Desktop.
FastCGI config snippet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Properly inform PHP code if HTTPS is in use. | |
fastcgi_param HTTPS on; # on if using HTTPS off otherwise | |
fastcgi_param SSL_PROTOCOL $ssl_protocol; # the SSL version in use e.g. TLSv1, SSLv3 ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set up Nginx's FastCGI module to set
$_SERVER['HTTPS']
and$_SERVER['SSL_PROTOCOL']
correctly for PHP that needs to test if its behind SSL. This seems to be a mod_apache thing. You can set these up correctly as follows.