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

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
T
Threat Research - Cisco Blogs
小众软件
小众软件
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
博客园 - 【当耐特】
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
The Last Watchdog
The Last Watchdog
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
S
Secure Thoughts
O
OpenAI News
P
Proofpoint News Feed
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
T
Tenable Blog
A
Arctic Wolf
L
LINUX DO - 热门话题
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
H
Heimdal Security Blog

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个机房按小时计费,支持支付宝,【点击查看】。