apache 2.4 找不到 SSL 憑證文件

apache 2.4 找不到 SSL 憑證文件

我嘗試在我的 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

以前有人遇過這樣的事情嗎?

相關內容