Ssl
如何配置 Certbot 不將 options-ssl-apache.conf 包含到我的 VirtualHosts 中?
# cat /etc/letsencrypt/options-ssl-apache.conf # Baseline setting to Include for SSL sites using Let's Encrypt certificates SSLEngine on # Intermediate configuration, tweak to your needs SSLProtocol -all +TLSv1.1 +TLSv1.2 #SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA SSLHonorCipherOrder on SSLCompression off SSLOptions +StrictRequire # Add vhost name to log entries LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common CustomLog /var/log/apache2/access.log vhost_combined LogLevel warn ErrorLog /var/log/apache2/error.log # Always ensure Cookies have "Secure" set (JAH 2012/1) Header edit Set-Cookie (?i)^(.*)(;\s*secure)??((\s*;)?(.*)) "$1; Secure$3$4"
由於我直接在 Apache 中設置了自己的全域 SSL 設置,因此我不希望 Certbot 不包含以下行中提到的文件:
Include /etc/letsencrypt/options-ssl-apache.conf
順便說一句,這條線被重複了,我在 VirtualHosts 中找到了 3 次……我希望 Certbot 根本不包含這個文件。
我該怎麼做?
您將需要使用以下
certonly
命令:身份驗證器是與 certonly 命令一起使用以獲取證書的外掛。身份驗證器驗證您是否控制了您正在為其請求證書的域,獲取指定域的證書,並將證書放在您機器上的 /etc/letsencrypt 目錄中。身份驗證器不會安裝證書(它不會編輯您伺服器的任何配置文件來提供獲得的證書)…
用法:
certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ... ... obtain, install, and renew certificates: (default) run Obtain & install a certificate in your current webserver certonly Obtain or renew a certificate, but do not install it
例子:
certbot certonly --webroot -w /var/www/example -d www.example.com -d example.com -w /var/www/other -d other.example.net -d another.other.example.net certbot certonly --standalone -d www.example.com -d example.com