开发者

Bitnami Wordpress with Google Cloud Load Balancer

My setup is Bitnami WordPress and Google Cloud Load Balancer. I've encountered a few issues.

To use a load balancer with Bitnami WordPress, I've to use this

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

That allows the VM to be accessible by both IP and domain. The problem is Google is indexing the VM's IP and some plugins are using the VM's IP too.

Neither can I use HTTPS because the SSL is handle开发者_StackOverflow社区d by the Load Balancer. That causes mixed content issues on some pages when some plugins are used. Adding X-Forwarded-Proto doesn't work.

The website will break if I use any other configuration other than

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

I wonder if it is because of my configuration error or is the native behaviour of Bitnami WordPress.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜