Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Did you disable original httpd.conf? –  Danila Ladner Apr 26 '13 at 12:04
    
the httpd.conf file on the server is blank –  Thomas Apr 26 '13 at 12:40
    
What is the output of apache2ctl -S ? And what do you see in your access logs? –  Krist van Besien Apr 26 '13 at 15:17
    
pastebin.com/83RuWCdA VirtualHost configuration: 109.228.x.x:443 secure.example.com (/etc/apache2/sites-enabled/example:34) wildcard NameVirtualHosts and default servers: *:80 is a NameVirtualHost default server server109-228-x-y.servers.net (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost server109-228-x-y.servers.net (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost example2.com (/etc/apache2/sites-enabled/example2:1) port 80 namevhost example3.com (/etc/apache2/sites-enabled/example3:1) Syntax OK –  Thomas Apr 26 '13 at 15:32
    
also access.log entry: 82.69.x.x - - [26/Apr/2013:16:38:14 +0100] "GET / HTTP/1.1" 302 693 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31" –  Thomas Apr 26 '13 at 15:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.