我已经通过 为我的域名获得了 SSL 证书certbot
。配置如下:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/root"
ServerName xxx.com
ServerAlias www.xxx.com
ErrorLog "/var/log/httpd/xxx.error_log"
CustomLog "/var/log/httpd/xxx.access_log" common
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.xxx.com [OR]
RewriteCond %{SERVER_NAME} =xxx.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
现在我已经安装了 Postfix SMTP 服务器并且也想获得证书mail.xxx.com
。现在如何为我的邮件服务器获取 SSL 证书?
我已经尝试过以下命令:
sudo certbot certonly --standalone -d mail.xxx.com
输出:
Problem binding to port 80: Could not bind to IPv4 or IPv6.
答案1
您可以尝试停止 Apache,这样端口 80 就会空闲并且 certbot 可以绑定到它。
sudo systemctl stop httpd
sudo certbot certonly --standalone -d mail.xxx.com