https
来源:互联网 发布:聊天软件哪个最好 编辑:程序博客网 时间:2024/04/28 04:12
1.https定义
加密传输数据,加密方法通过ssl
2.配置
yum install mod_ssl -y
yum isntall crypto-utils -y
genkey www.westos.com
vim /etc/httpd/conf.d/login.conf
<Virtualhost *:443>
ServerName "login.westos.com"
DocumentRoot "/var/www/virtual/login.westos.com/html"
CustomLog "logs/login.log" combined
SSLEngine on #开始https功能
SSLCertificateFile /etc/pki/tls/certs/www.westos.com.crt #证书
SSLCertificateKeyfile /etc/pki/tls/private/www.westos.com.key #密钥
</Virtualhost>
<Directory "/var/www/Virtual/login.westos.com/html">
Require all granted
</Directory>
<Virtualhost *:80> #网页重写实现自动访问https
ServerName login.westos.com
RewriteEngine on
RewriteRule ^(/.*)$ https://%{HTTP_HOST}$1 [redirect=301]
</Virtualhost>
^(/.*)$ https://^(/.*)$$1[redirect=301]
^(/.*)$ #客户主机在地址栏中写入的所有字符
https:// #定向成为的访问协议
%{HTTP_HOST} #客户请求主机
$1 #表示^(/.*)$的值
[redirect=301] #临时重定向 302永久重定向
mkdir /var/www/virtual/login.westos.com/html -p
vim /var/www/virtual/login.westos.com/html/index.html
systemctl restart httpd
测试
在客户主机中添加解析
172.25.254.118 login.westos.com
访问http://login.westos.com会自动跳转到
https://login.westos.com 实现网页数据加密传输
- HTTPS
- HTTPS
- Https
- HTTPS
- https
- HTTPS
- HTTPS
- https
- HTTPS
- https
- HTTPS
- Https
- https
- HTTPS
- Https
- https
- https
- https
- Oracle存储过程介绍
- 领域驱动设计系列(1)通过现实例子显示领域驱动设计的威力
- 『ORACLE』创建物化视图(11g)
- 自定义 ViewGroup 实现子 View 层叠效果
- MySQL远程访问及访问速度慢等问题解决
- https
- 在JS中获取后台的传到该页面的值
- ImageLoader的实现(1)-LruCache和DiakLruCache
- ImageLoader的实现(2)-ImageLoader的具体实现
- Android跨程序共享数据,探究内容提供器
- Android跨程序共享数据,探究内容提供器(进阶篇)
- java 单向链表的实现
- JDBC数据库操作
- 算法与数据结构-堆的基本操作C语言实现