ASR ASR -3 years ago 154
Apache Configuration Question

https url shows unable to connect

I have few sites which did not have

cert setup. The issue I am facing is, if these sites access using
it shows Unable to connect, Browser can't establish a connection to the server at error

I think it should give a Your connection is not secure warning and give an option to go to the site

I cannot redirect
since there is no connection with the server

Done few searches but nothing shows up other than setting up
and troubleshooting.

I'm using ubuntu server with apache2 installed. It will be great if anyone can advice where to look/start. Thanks!

Answer Source

Unable to connect, Browser can't establish a connection to the server at

This error can be shown when either apache or virtual host itself cannot be reached over port 443.
You can check it with:

netstat -ntpl | grep apache2

In case apache does not losten on port 443 you should enable mod_ssl for apache:

a2enmod ssl

Restart apache and check that it listens on port 443 using netstat.
And finally make sure that at least self-signed certificate is configured.

In case you use apache virtual hosts and apache itself listens on port 443 then you need to configure virtual hosts to be accessible over port 443 (I suppose this is your case).
Modify the virtual host configuration file like below:

<IfModule mod_ssl.c>
      ServerName ""
      DocumentRoot ...
      SSLEngine on
      SSLVerifyClient none
      SSLCertificateFile /path/to/self-signed/certificate

   ServerName ""
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download