我在000-default.conf
中配置时出现奇怪的错误消息<VirtualHost *:443>
ServerName test.com
Redirect permanent / https://www.test.com/
</VirtualHost>
<VirtualHost *:443>
ServerName www.test.com
... # all the stuff for my django app that most certainly does not relate to the issue at hand
SSLEngine on
SSLCertificateFile /etc/ssl/certs/www.test.com.crt
SSLCertificateKeyFile /etc/ssl/private/www.test.com.key
SSLCertificateChainFile /etc/apache2/ssl.crt/www.test.com.ca
</VirtualHost>
由于配置问题,Apache2不会重启:
[Fri Jul 08 11:36:24.388010 2016] [ssl:emerg] [pid 23159] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)
[Fri Jul 08 11:36:24.388057 2016] [ssl:emerg] [pid 23159] AH02312: Fatal error initialising mod_ssl, exiting.
有人可以对此发表评论吗?我不明白为什么会这样。