I upgraded my Debian from Lenny to Squeeze. BIG MISTAKE.
Now I get:
[Tue Feb 08 16:34:57 2011] [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)
littered throughout /var/log/apache2/error.log
.
How to fix? Looking through a mess of forums it is easy to see that Apache changed the way it reads configurations around 2.2.13. Great. But not great for me or the millions of other web administrators who now have web servers that simply won't start, and an error message that says NOTHING about the problem or how to fix.
Anybody else actually solved this issue? I had perfectly working virtual servers with SSL before (for years actually).
This problem is cause by a change in apache 2.2.12 to support SNI.
You can find all the details to fix the problem in the file
/usr/share/doc/apache2.2-common/NEWS.Debian.gz
on your server :Important information for packages upgrade are available in the NEWS.Debian file for a lot of packages. Installing the package
apt-listchanges
is recommanded to see the changes in this files on each upgrade.You need to replace:
with
Same time I think it will work only in case if you inherit SSL configuration from corresponding default virtual host and using constructions like
<VirtualHost *:80 *:443>
. In general that assumed that you using wildcard SSL certificate. These change will disable checks for SSLCertificateFile in corresponding VirtualHost.It will NOT disable https functionality for that VirtualHost.
While such error you will have since Apache 2.2.12 it was improved in Apache 2.2.14
According changelog for Apache 2.2.14:
So if error message indicate name/position of problematic definition - better to check/correct corresponding virtualhost.
This is solution from here
Also you may be interested in messages from Stefan Fritsch here
I am adding this because this is specifically how I solved the issue. However I'm awarding the answer of this question to @Fussy Salsify who gave me the answer I needed.
As per the link offered, /usr/share/doc/apache2.2-common/NEWS.Debian.gz, I ran the following command from my
/etc/apache2
directory:I have about 5 different virtual sites on my server. I found the one site that didn't have any SSL options inside the
VirtualHost
block, e.g.:Note that other virtual sites on my server had blocks like this:
So, I opened up my site-specific config file in
/etc/apache2/sites-enabled/nnn-specific
and inserted the lines:inside the
<VirtualHost>...</VirtualHost>
block.The server now runs.
Apparently VirtualHost configurations used to inherit from the initial VirtualHost configuration. This was behaviour commonly encouraged to be used by most Apache tutorials - we were instructed to set up a default host (the first one) with the SSL configuration and that would be inherited by all others. I'm very unhappy this was changed.
As SNI was not available in Lenny (and is still not supported under MSIE/WinXP BTW) I used a wildcard domain certificate, then used VirtualDocumentRoot to provide multiple vhosts using the same certificate.
This is how I fixed my install after the upgrade:
In /etc/apache2/ports.conf
Then in default-ssl, change
to
hope this helps others.
Rich / Artful Robot.