1.确保你已经正确开启了httpd 2.4.6的https配置,并且配置了该网站的虚拟主机,如下所示:

<VirtualHost *:443>
DocumentRoot "/appvol/wordpress_blog"
ServerName robin.org.cn
ServerAlias www.robin.org.cn
AddType text/html .php
<Directory "/appvol/wordpress_blog">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/appvol/wordpress_blog"
ServerName robin.org.cn
ServerAlias www.robin.org.cn
AddType text/html .php #对于80端口开启RUL重定向
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R] <Directory "/appvol/wordpress_blog">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

2.配置wordpress站点配置文件

在* @package WordPress后面添加如下配置:
//added at 2019.1.23
   $_SERVER['HTTPS'] = 'on';
   define('FORCE_SSL_LOGIN', true);
  define('FORCE_SSL_ADMIN', true);

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

前面添加如下配置,如果已经存在,确保http已经修改为https:

//added at 2019.1.19
$yovisunhome = 'https://'.$_SERVER['HTTP_HOST'];
$yovisunsiteurl = 'https://'.$_SERVER['HTTP_HOST'];
define('WP_HOME', $yovisunhome);
define('WP_SITEURL', $yovisunsiteurl);

3.重启httpd

service httpd restart

最新文章

  1. ReactiveCocoa 冷热订阅(cold subscribe, hot subscribe)
  2. CSS3系列一(概述、选择器、使用选择器插入内容)
  3. 解决mvc部署在IIS上以后出现404错误
  4. Android之使用Volley框架在ListView中加载大量图片
  5. onRetainNonConfigurationInstance和getLastNonConfigurationInstance
  6. Entity Framework 之 Code First
  7. jquery跨域请求数据
  8. iOSiOS开发之数据存储之NSKeyedArchiver
  9. 怎么用VBS脚本自动注册yy娱乐的账号
  10. Java第6次实验提纲(异常)
  11. 妙谈js回调函数的理解!
  12. Django的rest_framework的权限组件和频率组件源码分析
  13. qvalue: Check that you have valid p-values or use a different range of lambda
  14. Shell编程积累 zhuan
  15. 使用ViewPager和Fragment实现滑动导航
  16. mysql优化【转】
  17. hibernate3.3.2搭建log4j日志环境
  18. 从邮件原理来看 postfix和docecot
  19. Android中WebView的跨域漏洞分析和应用被克隆问题情景还原(免Root获取应用沙盒数据)
  20. Oracle Study之-AIX6.1构建Oracle 10gR2 RAC(4)

热门文章

  1. 剑指Offer - 九度1521 - 二叉树的镜像
  2. 《Cracking the Coding Interview》——第7章:数学和概率论——题目7
  3. Centos在VMware虚拟机上的网络配置一记
  4. webdriver--定位一组元素+iframe表单切换
  5. Pytest+allure生成测试报告
  6. ubuntu 16.04 安装grpc
  7. Android事件分发机制详解(1)----探究View的事件分发
  8. HDU 1171 Big Event in HDU 母函数
  9. Java分布式数据导出实践
  10. java.net.SocketException: recvfrom failed: EBADF (Bad file descriptor)