apache2 global SSL setup

On OpenSUSE 10.3 I have several virtual host files under
/etc/apache2/vhosts.d/. These files were created from the template:
/etc/apache2/vhosts.d/vhost.template (not

Does anyone know how do I setup SSL globally so all these virtual hosts
be accessed on port 443 as well?

I have created the SSL certificates using
/usr/share/doc/packages/apache2/certificate.sh script

I have also edited /etc/sysconfig/apache2 and added APACHE_SERVER_FLAGS=“SSL”

I can access the site on but if I try
I get error message “ has sent an incorrect or unexpected message.
Error Code: -12263” (tried from Firefox In apache2 error log I get
“Invalid method in request \x16\x03\x01”

Apache2 is listening on port 80 and 443 on

I have read Apache Howto SSL - openSUSE
and when I try a2enmod ssl and a2enflag SSL I get message
“ssl already present”

Thanks for any help.

You have to edit those <virtualhost> elements so that they are also active for port 443.

Due to the nature of HTTPS and virtualhosts, you will get a mismatch on the certs on all but one HTTPS host, unless you have a wildcard certificate.

Sorry how do I do that? At the moment, the Apache2 directive is “<VirtualHost *:80>”


<Virtualhost default:443>

as shown in vhost-ssl.template. But as I explained, you don’t really have named-based virtualhosts with SSL so they will all go to one host, the default one. You can have IP-based virtualhosts with SSL.

The reason is that SSL communication is established before the Host: line is sent to the server. So all the requests will end up at the default server.