Setting up SSL virtual hosts in Apache
Posted
by Bart van Heukelom
on Server Fault
See other posts from Server Fault
or by Bart van Heukelom
Published on 2010-02-25T10:10:39Z
Indexed on
2010/03/28
10:03 UTC
Read the original article
Hit count: 740
I'm trying to set up SSL, with SNI, in my apache and am getting the often-seen "ssl_error_rx_record_too_long" error in Firefox when accessing the site (https://test.me.dev.xxxx.net), from which I can conclude that the server is listening on port 443, but doesn't know to use SSL on it.
The server is Ubuntu 9.04 with Apache 2.2.11 I enabled SSL in the default way (a2enmod ssl).
Here is my relevant config:
NameVirtualHost *:*
Listen 80
<IfModule mod_ssl.c>
Listen 443
</IfModule>
...
<VirtualHost *:*>
DocumentRoot /home
ServerAlias *.dev.xxxx.net
UseCanonicalName Off
# project.user.dev.xxxx.net
VirtualDocumentRoot /home/%2/dev/%1/web
SSLEngine On
SSLCertificateFile /etc/apache2/certs/dev.crt
SSLCertificateKeyFile /etc/apache2/certs/dev.key
</VirtualHost>
What is wrong?
© Server Fault or respective owner