![apache 2.4 找不到 SSL 证书文件](https://linux22.com/image/653096/apache%202.4%20%E6%89%BE%E4%B8%8D%E5%88%B0%20SSL%20%E8%AF%81%E4%B9%A6%E6%96%87%E4%BB%B6.png)
我尝试在 apache 2.4.12 Web 服务器上配置 SSL。但 apache2 在对应的 ssl 目录中找不到证书和密钥文件。我已经检查了文件权限,但没有成功。证书不为空,并且相同的证书在 apache 2.0.64 ssl 安装中有效。
这是错误信息:
/usr/sbin/apache2 -f /etc/apache2/httpd.conf
AH00526: Syntax error on line 7 of /etc/apache2/mod_ssl.conf:
SSLCertificateFile: file '/etc/apache2/ssl/cert/server.crt' does not exist or is empty
这是我的 mod_ssl.conf
cat mod_ssl.conf
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "/var/www/"
ServerName 192.168.2.1:443
ServerAdmin [email protected]
SSLEngine on
SSLCertificateFile "/etc/apache2/ssl/cert/server.crt"
SSLCertificateKeyFile "/etc/apache2/ssl/key/server.key"
</VirtualHost>
/etc/apache2/ssl/cert$ ll
drwxrwxrwx 2 www www 232 Jan 1 01:57 .
drwxrwxrwx 4 www www 288 Jan 1 01:54 ..
-rwxrwxrwx 1 www www 863 Feb 10 2015 server.crt
/etc/apache2/ssl/key$ ll
drwxrwxrwx 2 www www 232 Jan 1 01:56 .
drwxrwxrwx 4 www www 288 Jan 1 01:54 ..
-rwxrwxrwx 1 www www 916 Feb 10 2015 server.key
以前有人遇到过类似的事情吗?