I am setting up an SSL certificate for the first time on an Ubuntu server. I have purchased a dedicated IP address and have purchased the certificate under the subdomain of secure.example.com
Port 443 is open and being listened to by apache and using an online server to check the secure.example.com domain shows that the certificate appears to be setup and working fine. Here is my config for the domain:
<VirtualHost *:80>
..
</VirtualHost>
<VirtualHost 109.228.x.x:443>
DocumentRoot /var/www/example.com
ServerName secure.example.com
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/secure.example.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/secure.example.com.key
SSLCertificateChainFile /etc/apache2/ssl/Intermediate.crt
<Directory "/var/www/example.com">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
However when I go to https://secure.example.com it redirects to http://secure.example.com displaying the default "It works!" page since it isn't configured. I cannot see anything in any error logs and I am not sure where to go from here.
Thanks for any help.