本次博文主要介绍https的配置、及其安全证书、设定https虚拟主机并设定网页重写。
https及安全证书
https : 保护客户端传到服务端不被**

生成证书,这里以生成https://www.westos.com为例:
安装yum install mod_ssl -y
linux---https安全证书与网页重写
此时配置目录自动生成==== 配置文件:ssl.conf
linux---https安全证书与网页重写
systemctl restart httpd
netstat -antlupe | grep httpd #443端口开启
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload
linux---https安全证书与网页重写
下载yum install crypto-utils
执行genkey www.westos.com
linux---https安全证书与网页重写
linux---https安全证书与网页重写linux---https安全证书与网页重写linux---https安全证书与网页重写进行加密,这一步需要随机移动鼠标操作键盘,这是因为加密与==/dev/random==有关, 无轨迹操作时,这个文件会随机生成数据。
linux---https安全证书与网页重写生成证书后,不选择发送给CA
linux---https安全证书与网页重写linux---https安全证书与网页重写
自定义自签名证书信息:
linux---https安全证书与网页重写
linux---https安全证书与网页重写vim /etc/httpd/conf.d/ssl.conf

linux---https安全证书与网页重写systemctl restart httpd
访问https,可以看到证书信息是自己指定的信息:
linux---https安全证书与网页重写设定https虚拟主机并设定网页重写
强制转换 http: ----->为https:
在vhost文件对创建一个虚拟访问站点(login.westos.org) 端口为443
vim /etc/httpd/conf.d/vhost.conf
linux---https安全证书与网页重写
mkdir /var/www/virtual/westos.org/login
vim /var/www/virtual/westos.org/login/index.html
linux---https安全证书与网页重写
在vhost文件创建一个虚拟访问站点 端口为80 指引对网页进行重写
指引对网页进行重写
linux---https安全证书与网页重写

^(/.) $ 客户在浏览地址栏中输入的所有字符
https:// 强制客户加密访问
%{HTTP_HOST} 客户请求主机
$1 "$1"表示^(/.
)的值
[redirect=301] 永久重写 302临时,默认永久
systemctl restart httpd
在本地解析文件设置好域名信息后,就可以尝试访问了:
linux---https安全证书与网页重写

相关文章:

  • 2022-12-23
  • 2021-12-02
  • 2021-04-20
  • 2021-12-13
  • 2021-12-31
  • 2021-12-16
  • 2021-05-30
  • 2022-12-23
猜你喜欢
  • 2021-07-12
  • 2021-04-18
  • 2021-08-08
  • 2022-02-10
  • 2021-09-20
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案