Can't access site after adding SSL (Please help)

November 30, 2017 102 views
Apache Ubuntu 16.04

Hi everyone! This is my first time using digital ocean. My wordpress site was working great until I decided to go for an SSL. First I went with https://gethttpsforfree.com/ and after completing the setup I found an error when going to my site which was:

This site is unreachable
The server rejected the connection.

I decided to delete the wordpress site and start from scratch but this time I tried sslforfree.com which resulted in the same problem! Can someone give me a helping hand? I've been sitting here for hours trying to figure something out. I have no idea what to do.

EDIT

I went into
sudo nano/etc/hosts
and I added xxx.xxx.xx.xxx domain.com under localhost.

Now I can access my site but only by going to "domain.com"
www. and IP is not working.

Any help would be appreciated :)

1 Answer

"The server rejected the connection" means either your web server isn't running (the rejection is performed by the server machine itself, as nothing is listening on the http/https port) or isn't listening on the correct port.

The first step to diagnose this would be to start the webserver, verify that it fails to start, and then look at any error output in logs. With apache, you have apache2ctl configtest that will tell you what's wrong with your configuration syntax.

Have another answer? Share your knowledge.