在提供SSL的负载均衡器后面托pipe的WordPress
干净的Wordpress网站位于后面的loadpalancer代理,为wp.mydomain.com提供通配符SSL,但我没有参与其configuration。 基于CentOS 7.1的WP服务器,安装了Apache。 我为该域创build了简单的虚拟别名: <VirtualHost *:80> ServerName wp.mysite.com DocumentRoot "/var/www/wp.mysite.com/public_html" <Directory "/var/www/wp.mysite.com/public_html"> Options Indexes FollowSymLinks AllowOverride All Order Deny,Allow Allow from all </Directory> DirectoryIndex index.php index.phtml index.html index.htm <IfModule mpm_peruser_module> ServerEnvironment apache apache </IfModule> ErrorLog /var/www/wp.mysite.com/error.log CustomLog /var/www/wp.mysite.com/access.log combined </VirtualHost> 网站的HTTP版本一切正常,但没有HTTPS版本。 加载网站时出现“ 混合内容”问题。 此外,我不能使用WPpipe理员,这让我陷入redirect循环的问题。 我已经将下一部分代码添加到wp-config.php中: if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; define('WP_HOME','https://wp.mysite.com'); define('WP_SITEURL','https://wp.mysite.com'); 谢谢。