咖啡的世界

  • 首页
  • 归档

  • 搜索
计算机基础 mac scoop 工具 书籍 java oracle mysql linux centos https nginx

配置 Nginx SSL 证书

发表于 2019-11-02 | 分类于 Nginx | 0 | 阅读次数 1194

前期准备

yum remove epel-release
yum clean all

yum -y install yum-utils

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

安装 certbot 以及 certbot nginx 插件

yum install certbot python2-certbot-nginx -y

执行配置,中途会询问你的邮箱,如实填写即可

certbot --nginx

手动续约

service nginx stop
certbot --force-renewal

或者使用

certbot --nginx --register-unsafely-without-email

开放80和443端口

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload

开放多个端口

firewall-cmd --zone=public --add-port=80-85/tcp --permanent
  • 本文作者: 随影求是
  • 本文链接: https://itbto.com/archives/配置nginxssl证书
  • 版权声明: 本博客所有文章除特别声明外,均采用CC BY-NC-SA 3.0 许可协议。转载请注明出处!
# nginx # https
Hello Halo
Centos7 防火墙开启 80 443 端口
  • 文章目录
  • 站点概览
随影求是

随影求是

20 日志
9 分类
12 标签
RSS
Creative Commons
© 2022 随影求是
由 Halo 强力驱动
|
主题 - NexT.Gemini v5.1.4