HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

CentOS 8 Apache 启用 SSL

2020年10月06日 764Browse 0Like 0Comments

在 CentOS 8 安装成功后,如果希望启用 ssl,你需要执行下面的一些操作。

安装 mod_ssl

使用下面的命令安装 mod_ssl

# dnf install mod_ssl

确定 mod_ssl 被启用

这一步不是必须的,但是你可以使用下面的命令确定安装的 mod_ssl 已经被启用了。

apachectl -M | grep ssl

服务器可能会返回:

apache-mod-ssl-centos-01

类似上面的情况和内容,你可以通过上面的返回确定 ssl 已经被启用了。

防火墙启用 443 端口

如果已经安装了防火墙的话,你需要为你的防火墙开放 443 的端口。

需要执行下面的命令:

firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --reload
systemctl restart firewalld

配置虚拟主机

如果你的 Apache httpd 服务使用了虚拟主机,你可以在下面的文件中配置你虚拟主机的信息。

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

在上面的配置文件中,需要设置 key 和 crt 信息,请参考网络上的配置。

通过上面的步骤,就完成了在 CentOs 8 的 httpd 服务器上配置使用 ssl 的所有内容。步骤比较简单,只需要按照上面的顺序就可以完成了。

 

https://www.ossez.com/t/centos-8-apache-ssl/554

Tags: None
Last updated:2020年10月07日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
IntelliJ IDEA 2023.1 版本添加了包中类的列表功能 Jenkins 修改启动的端口 Spring 项目运行提示错误 Not a managed type Linux 查看 SELinux 的状态 WordPress 网站 Error Establishing a Database Connection(建立数据库连接时出错) Linux 开启或关闭 SELinux
Confluence 7 文件编辑修改你的默认应用 FAA 真的应该换换系统了 Spring JPA 如何进行无参数查询布尔类型 美国绿卡持有者去加拿大旅游从2022年4月26日起不再需要eTA Confluence 6 链接到其他应用 中国为什么还不禁航国际航班
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS