Wednesday, October 16, 2019

Run Bitnami Wordpress Behind Load Balancer


This is mostly a note for myself after finally figuring out how to do this. The rest of the internet looks like they'd rather terminate the SSL on their own instances.









define('WP_SITEURL', 'https://xyz.com/');
define('WP_HOME', 'https://xyz.com/');
if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){

$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}




Then wordpress and the plugins and forcing everybody to use https all works like it's supposed to.


No comments:

Post a Comment