Apache2 虚拟主机上的 SSL 安装问题

Apache2 虚拟主机上的 SSL 安装问题

我正在尝试安装 SSL 证书,但重启 Apache 时出现错误。我收到此错误

Syntax error on line 25 of /etc/apache2/sites-enabled/xxxx.com: 

无效命令‘SSLCertificate’,可能是拼写错误或由服务器配置中未包含的模块定义

现在域的配置如下所示

<virtualhost *:80>

ServerAdmin [email protected]
ServerName nearbyregistry.com
ServerAlias www.xxxx.com
DirectoryIndex index.cfm
DocumentRoot "/var/www/nearby"
</virtualhost>

<virtualHost 23.xx.xx.xx:443>
ServerName xxxx.com
DocumentRoot "/var/www/nearby"
SSLEngine on
SSLCertificate  /etc/apache2/ssl/certs/xxxx.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/private/www_xxxx_com.key
SSLCertificateChainFile /etc/ssl/xxx_bundle.crt
</virtualhost>

我错过了什么?

谢谢!

答案1

应该的指令是SSLCertificateFile

答案2

SSLCertificateFile /path/to/file

而不是 SSLCertificate

相关内容