Last active
April 25, 2018 22:00
-
-
Save jose-serrao/daedfbc92ccc0efc33aa076ab7c9c959 to your computer and use it in GitHub Desktop.
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
https://www.variantweb.net/blog/wordpress-behind-an-nginx-ssl-reverse-proxy/ | |
/** | |
* Handle SSL reverse proxy | |
*/ | |
define('FORCE_SSL_ADMIN', true); | |
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') | |
$_SERVER['HTTPS']='on'; | |
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { | |
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment