[英]Enable https (certbot) with new domain, apache
我添加了一個域。
想要使用 certbot 為新域啟用 https。
在此之后https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
sudo certbot --apache
[sudo] password for qq:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: old.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
我只能看到我的舊域。 我有通過新域的 ssh。
如何添加新域?
我的猜測是您忘記在 Apache 配置中添加域。 嘗試在/etc/apache2/sites-available
查看您的配置。
如果您的新域名已經配置,請通過檢查配置文件是否鏈接到/etc/apache2/sites-enabled
來嘗試查看它是否已/etc/apache2/sites-enabled
。 如果是,請嘗試重新加載 apache2 以確保加載最新的配置
sudo systemctl reload apache2
或者,如果配置不存在,請嘗試啟用它們
sudo a2ensite my-new-config
sudo systemctl reload apache2
如果新域仍未出現,您可以嘗試手動生成證書,然后在您的配置中手動使用它:
sudo certbot certonly -d new-domain.com -d www.new-domain.com
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.