Why can't I connect to HTTPS on my site?

All of the SSL certificates have been downloaded but I'm still not able to obtain a secure SSL connection. Here is what I'm seeing when I try to connect over port 443 (HTTPS):

curl -IL 123.456.789.10:443

curl: (7) Failed to connect to 123.456.789.10 port 443: Connection refused

I'm using a Debian 8 distribution and Apache.

3 Replies

You'll need to make sure that you have an Apache "Virtual hosts" file for your site that provides a path to your certificates:

Configure Apache to use the SSL Certificate

Once the Virtual Hosts file is all set up you'll want to make sure that the Apache SSL module is enabled and then enable the the virtual host file that you just created (using the domain name example.com):

a2enmod ssl

a2ensite example.com

Then you just need to restart Apache to apply the changes:

systemctl restart apache2

Please also check your firewall as well.

Another great command for SSL troubleshooting is 'apachectl -S'. This will show you the Apache virtual hosts that are being served and the order they are checked(top down).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct