WORDPRESS改为https部署
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
WORDPRESS改为https部署的更多相关文章
- WordPress安全篇(1):WordPress网站启用HTTPS详细教程
以前我们浏览网页使用的都是HTTP协议,HTTP使用明文传输,所以传输过程中很容易遭受黑客窃取.篡改数据,很不安全.在WordPress网站上启用HTTPS协议访问后,能大大提升站点的安全性,启用HT ...
- tomcat 容器下web项目由http改为https操作步骤及相关的坑
一.https介绍: HTTPS(全称:Hypertext Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP ...
- 使WordPress改域名后网站正常运行的方法
使WordPress改域名后网站正常运行的方法 wp-content/wp-config.php $path = '/blog'; $scheme = (isset($_SERVER['HTTPS'] ...
- 阿里云Https部署网站
0.开始之前 文章图片很多,注意流量 首先你得准备好一个已经备案成功的域名,并且有一个在阿里云的服务器部署了的网站. 然后就是你迫切的希望升级网站为HTTPS部署. 那么我们开始吧! 1.申请CA证书 ...
- IIS7 + mysql + php + wordPress 在win7下部署
最近在玩WordPress.wiki等开源平台的站点部署.通过一下实践和资料学习,为了以后少走弯路,觉得有必要把这个过程记录下来. 用到的东西: IIS服务: mysql; php; wordpres ...
- HTTPS 部署简要指南
许多Web开发者都知道SSL,但常见的情况是SSL没有完整地部署或者没有部署在它应该部署的地方.这篇关于何时及如何部署SSL的简要指南,将帮助你避免大多数常见错误. 要点 如果你有任何机密信息,或者你 ...
- etcd+https部署
关闭防火墙 关闭selinux 下载所需的包(cfssl,生成证书工具) mkdir /usr/local/src/etcd/ cd /usr/local/src/etcd/ wget https:/ ...
- LAMP——实现phpMyadmin、wordpress及Discuz应用部署
一.环境准备 操作系统:Centos8.3.2011 软件:Apache2.4.37.Mysql8.0.21.PHP7.2.24 二.安装过程 1.安装phpmyadmin 1.1.安装软件包并启动服 ...
- 访问方式由http改为https curl:(51)
系统访问由http变为https,先申请了CA证书,然后win下浏览器访问时没问题的,但是linux下通过curl的方式访问就报错: curl:(51) SSLcertificate subject ...
随机推荐
- 《算法》C++代码 前言
现在大二正在上<数据结构>课,课内的书上代码实现很喜欢无脑用类.变量名字很长,而且常常实现太繁琐,并且代码有些无法运行,这些对于老手无所谓,但初学者看起来却会很不舒服.因此写点自己的代码, ...
- leetcode 【Rotate List 】python 实现
题目: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Giv ...
- mysql错误:Column ‘id’ in field list is ambiguous的解决方法
[Err] 1052 - Column 'modify_time' in where clause is ambiguous 出错的语句: SELECT AVG(T.se)%60FROM( SELEC ...
- Windows+Python 3.6环境下安装PyQt4
第一步:下载.whl,地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4,这里可以下载不同的python版本对应的包. 第二步:选择一个目录,将下 ...
- ExtJs学习之MessAgeBox的使用
1.Ext.MessageBox.alert() 调用格式: alert( String title, String msg, [Function fn], [Object scope] ) 参数说明 ...
- 二分查找树按照key值划分
#include <iostream>#include <vector>#include <algorithm>#include <string>#in ...
- Android动态添加和移除布局
package com.hyang.administrator.studentproject; import android.os.Bundle; import android.support.v7. ...
- hadoop2.6.4【ubuntu】单机环境搭建 系列1
jdk安装 tar zxvf jdk mv jdk /usr/lib/jvm/java jdk环境变量配置 vim /etc/profile ``` export JAVA_HOME=/usr/lib ...
- Icarus Verilog和GTKwave使用简析
Icarus Verilog和GTKwave使用简析 来源 http://blog.csdn.net/husipeng86/article/details/60469543 本文测试文件在window ...
- [codeforces934E]A Colourful Prospect
[codeforces934E]A Colourful Prospect 试题描述 Firecrackers scare Nian the monster, but they're wayyyyy t ...