Ubuntu – Can’t get SSL to work

apache-2.2sslUbuntu

I'm trying to get Apache 2 to use SSL for one of many domains on a server. I don't care about any of the other domains running SSL on the server. I'm trying to do this for a Facebook app. Nothing on the server is listening on port 443 according to http://www.t1shopper.com/tools/port-scan/

The url is facebook.mythinairwireless.com

I followed this guide: http://www.codealpha.net/631/name-based-virtual-hosts-with-ssl-using-apache2-on-ubuntu-lucid/

When I restart apache, I get these log messages:

[Fri Jan 20 20:23:42 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Jan 20 20:23:42 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Jan 20 20:23:42 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k configured -- resuming normal operations

My ports.conf file looks like this:

NameVirtualHost *:80
NameVirtualHost *:443

Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

And my config file for the website (aside from some filepaths:

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile obscured

ServerName facebook.mythinairwireless.com
ServerAdmin webmaster@localhost

    DocumentRoot /home/obscured/facebook

ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

</VirtualHost>

My configuration for port 80 is in this file as well.

Best Answer

These are just warnings. You should get your website working with SSL support given that your browser supports SNI (Server Name Indication).

Because of this, it is recommended to configure IP-based virtual hosting for SSL websites instead of Name-based.