У меня был сертификат LetsEncrypt SSL для моего домена (как domain.com, так и www.domain.com).Теперь я хотел добавить workflow.domain.com к сертификату.Я попытался использовать опцию расширения certbot с помощью следующей команды:
certbot -d domain.com -d www.domain.com -d workflow.domain.com --expand
Certbot вернул успешный ответ.Тем не менее, браузер по-прежнему показывал небезопасные ...
Итак, я отозвал свои сертификаты, чтобы начать очистку.
Я запустил certbot с certbot --apache
.Он показал мои 3 варианта правильно, поэтому я выбираю все 3 для включения в сертификат.
Certbot возвращается без ошибок, хотя браузер продолжает показывать меня небезопасным на workflow.domain.com
?
вывод certbot certificates
показан ниже:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Found the following certs:
Certificate Name: domain.com
Domains: domain.com workflow.domain.com www.domain.com
Expiry Date: 2019-12-20 15:05:24+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/domain.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/domain.com/privkey.pem
-------------------------------------------------------------------------------
Обратите внимание, что два других домена (domain.com и www.domain.com) отображаются как безопасные
Конфигурация виртуального хоста дляподдомен показан ниже:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName workflow.domain.com
serverAdmin info@domain.com
DocumentRoot /var/www/Domain/Workflow
<Directory /var/www/Domain/Workflow>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
AddType application/x-font-ttf ttc ttf
AddType application/x-font-otf otf
AddType application/font-woff woff
AddType application/font-woff2 woff2
AddType application/vnd.ms-fontobject eot
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
# RewriteCond %{SERVER_NAME} =domain.com [OR]
# RewriteCond %{SERVER_NAME} =www.domain.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
</VirtualHost>
</IfModule>