So I have a debian wheezy installation where I someone started to install SSL but gave up and so I'm here to finish the task.

problem - when accessing with http (port 80) - all is working. When accessing https (443) - ERR_CONNECTION_CLOSED.

So I started debugging from the start - - Is router forwarding 443 to the internal ip of the server - Check. - Is port opened - Check. - Is port listening - Check. - Apache is starting correctly - Check

So it seems to me the problem is in Apache settings - I go to the default-ssl in the /etc/apache2/sites-enabled and check - it is the same template as always (default crt/key files which are available, checked)

    <IfModule mod_ssl.c>
        <VirtualHost *:443>
            ServerAdmin webmaster@hostmauritius.com
            ServerName www.mysite.com:443
            DocumentRoot /var/www/mysite/
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None

So here I'm a bit lost - I always just added a virtual site and all was working for me. I'm not sure if the person who started before me did something weird but there has to be a logic which will allow to find the problem...

  • 1
    Try apache2ctl -t -D DUMP_VHOSTS to see if you have correct virtual host definitions for *:443. Do you have SSLEngine on and other SSL certificate file specifications in every SSL enabled <VirtualHost>? – yaegashi Aug 21 '15 at 8:45
  • Thanks for the comment - I dumped the vhosts list and indeed got nothing on 443 nor the domain (many others did show up). I'm sure apache is reading the default-ssl files in sites-enabled because if I put any error in the syntax it can't start - and I think config is correct. I have the SSL enabled and listen in the file. Any idea would be appreciated :) – Yanipan Aug 21 '15 at 9:13
  • Then have you run a2enmod ssl to enable mod_ssl? – yaegashi Aug 21 '15 at 9:44
  • Yes, tried again and prompted it's already enabled. – Yanipan Aug 21 '15 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.