惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

Rat's Blog - Apache

Linux VPS使用Webbench/Apache-ab进行网站压力测试 - Rat's Blog Apache环境强制http 301跳转https的方法 - Rat's Blog Linux VPS下Nginx与Apache环境防盗链设置方法 - Rat's Blog apache端口被异常占用导致无法启动的解决方法 - Rat's Blog
CentOS 6系统Apache环境配置SSL证书教程 - Rat's Blog
博主: Rat's · 2015-06-25 · via Rat's Blog - Apache
  •  发布时间:
  •  11709 次浏览
  •   暂无评论
  •  1097 字数
  • 分类: 建站知识
  1.  首页
  2. 正文  
  3. 分享到:

简介

SSL证书用于加密计算机与指定服务器之间的数据,从而创建安全连接。SSL证书可以是自签名的,也可以由受信任的CA颁发。所有主要网站不使用自签名证书的原因是因为所有浏览器都会识别该站点正在使用自签名(和不可信)的证书,并显示一个警告页面,而当使用受信任的CA签名的证书时,在大多数情况下,浏览器会识别它,并允许您继续访问该网站。在本教程中,我们将使用自签名证书,因为他们可以自由发布/发布。

主机要求:CentOS 6系统或更高版本,装有Apache环境,内存,最低512MB。

配置SSL

1、安装Mod SSL

yum install mod_ssl

2、创建目录,存放证书

mkdir /etc/httpd/ssl

3、创建自签名证书

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt

4、设置SSL证书
打开SSL配置文件:

nano /etc/httpd/conf.d/ssl.conf

找到以<VirtualHost _default_:443>开头的部分。取消注释DocumentRootServerName行,并将example.com替换为您的域名或服务器IP地址(如果您不想得到任何错误,则应与证书上的通用名称相同):

ServerName example.com:443

您还应该找到以下三行,并确保它们匹配以下扩展名:

SSLEngine on
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key

5、重启Apache服务

/etc/init.d/httpd restart

现在,就可以访问了。
原文地址:firstchoicehosting.co.uk


版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/123/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。

Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。