在 RHEL 上使用 Lets Encrypt 设置 SSL

Setup SSL with Lets Encrypt on RHEL

我正在尝试使用 Letsencrypt 设置 ssl 证书,但是当我 运行 :

./letsencrypt-auto --apache -d industriemedia.tv

好像找不到我的域名:

[root@ip-172-31-21-7 letsencrypt]# ./letsencrypt-auto --apache -d industriemedia.tv
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for industriemedia.tv

We were unable to find a vhost with a ServerName or Address of industriemedia.tv.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)
-------------------------------------------------------------------------------
1: ssl.conf                       |                       | HTTPS | Enabled
-------------------------------------------------------------------------------

但是我在/etc/httpd/conf/httpd.conf

中添加了一个虚拟主机
<VirtualHost *:80>
  ServerName www.industriemedia.tv
  ServerAlias industriemedia.tv *.industriemedia.tv
  DocumentRoot /var/www/html/
</VirtualHost>

我只好打开了没有打开的443端口

同时执行 ./letsencrypt-auto 重置我的 ssl 证书并且我的域被识别。