web服务(Centos7)之配置https

本文介绍了HTTPS的诞生背景,旨在解决HTTP协议传输过程中的安全性问题。详细阐述了在CentOS7上搭建HTTPS的过程,包括申请证书、安装配置mod_ssl模块,并提供了测试和验证HTTPS成功安装的方法。注意,自签名证书可能导致浏览器警告,需添加例外才能正常访问。
摘要由CSDN通过智能技术生成

一 什么是HTTPS

由于HTTP协议是已明文进行传输的,这就造成了传输的数据易被拦截泄露。为解决HTTP传输的过程中无法保证其安全性的问题,HTTPS就诞生了。https 是具有安全性的ssl加密传输协议,数据在离开发送端前被加密,到客户端是在进行解密。这样就使得数据在传输过程中的安全性大大提高了,但同时由于其数据被加密,加密后的大小明显大于未加密之前的数据,也增加了传输链路的负担。

二 HTTPS搭建

  • 申请证书
[root@localhost certs]#
[root@localhost certs]#
[root@localhost ~]# cd /etc/pki/tls/certs/
[root@localhost certs]#
[root@localhost certs]#
#建立服务器私钥
[root@localhost certs]# make server.key
umask 77 ; \
/usr/bin/openssl genrsa -aes128 2048 > server.key
Generating RSA private key, 2048 bit long modulus
..........................+++
.................+++
e is 65537 (0x10001)
Enter pass phrase:
Verifying - Enter pass phrase:
[root@localhost certs]#
[root@localhost certs]#
#删除密钥中的口令,防止系统启动被询问口令
[root@localhost certs]# openssl rsa -in server.key -out server.key 
Enter pass phrase for server.key:
writing RSA key
[root@localhost certs]#
[root@localhost certs]#
[root@localhost certs]# ls
ca-bundle.crt        make-dummy-cert  renew-dummy-cert
ca-bundle.trust.crt  Makef
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值