Why is my website blocked on secure networks?

November 24, 2015 615 views
Security Networking Apache Ubuntu

I can't get my website to load on secure networks. I have had an SSL Certificate created, not sure if that helps.

1 comment
  • need more information.
    What do you want to do?

    Right now I am interpreting what you have written as:

    • I am on a secure network and I can not access my website as it is blocked.

    I am pretty sure this is not what you are asking. If it is, then the answer is go speak to the network administrator for the secure networks and ask them why they are blocking your website.

    I'll take stab and reword your question.

    • I have a website and I want it to be accessible via HTTPS however it is not working. Whenever I go to https://mysite it comes up as "connection refused".

    If anything above is relevant, please reword your question so others are able to assist you :)

1 Answer


To use an SSL Certificate to access https://yourdomain.ext, you'll need to generate a CSR (Certificate Signing Request), supply that to your SSL Provider and then add the SSL Certificate that they issue to your VirtualHost configuration.

To do this, once you have the required file(s), you'd want to edit the VirtualHost associated with your domain and find either:

<VirtualHost DROPLET_PUBLIC_IP:80>


<VirtualHost *:80>

and change it to:

<VirtualHost DROPLET_PUBLIC_IP:443>

.... where DROPLET_PUBLIC_IP would be the Public IP Address assigned to your Droplet.


In the same file, find:

ServerName yourdomain.ext:80


ServerName yourdomain.ext

and change it to:

ServerName yourdomain.ext:443

... now, still in the same file, you'll want to add the following towards the bottom of your VirtualHost configuration:

SSLEngine on
SSLCertificateFile        /path/to/ssl-cert.pem
SSLCertificateKeyFile     /path/to/ssl-cert.key

... where /path/to/ = the full path to the pem and key file for your SSL Certificate.

Now save, close the file and issue the following command from the CLI:

a2enmod ssl

The above command will enable the SSL Module if it hasn't already been.

Finally, you need to restart Apache by issuing:

service apache restart


/etc/init.d/apache2 restart
Have another answer? Share your knowledge.