Can't load IP address or domain, but SSH and Ping is working.

I am running a LAMP stack on Ubuntu 16.04. On it I have three wordpress instances installed, one is on a subdomain, and the other two are on TLDs. Earlier today everything was working fine.

Just now when I go to one of the domains it does not load and then gives me this error: ERR_CONNECTION_TIMED_OUT

I have tried restarting Apache and turning my droplet on and off, still it does not work. I am able to SFTP into the IP using Filezilla, I can SSH into the IP on a command line, I ran a ping test on the IP and it came back fine. I am only on the 1GB Memory 1 Core Processor, is it possible that’s an issue? My usage of the site seems to be minimal, I just installed the wordpress instances and only had a bare bones site on one of them, the rest were blank.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@jtittle @hansen

I just restarted apache to fix the connection being refused. I have absolutely no idea at what point it was fixed, but a tremendous thank you to you both for helping me with this!!

@jtittle I checked the ports.conf and did the grep command, but it was only in the ports.conf. it looks identical to your file too. I changed it to to see if that would do anything and it didn’t.

Another note, is now my error has changed, it’s no longer timing out when I try to visit the domain/IP, not it just says connection is being refused.


I deployed a fresh Ubuntu 16.04 Droplet to check the configuration for Apache as it tends to change from time to time.

The Listen directive should be defined in /etc/apache2/ports.conf, which should look like:

Listen 80

<IfModule ssl_module>
        Listen 443

<IfModule mod_gnutls.c>
        Listen 443

If any of those are setup with an IP, or if any Listen directive is setup with an IP elsewhere, then that may be the issue. Only specifying the port leads to listening on both IPv4 and IPv6 IP’s. If you specify an IP address, then it will only listen on the protocol for that IP.

You can run:

grep "Listen" /etc/apache2/*.conf

To see if any files, other than ports.conf, have a Listen directive setup. If they did, check that file and that should lead to us getting this fixed.


The Listen directive would be in your Apache configuration.

It may be set as one of the following, it all depends on the repository or, if you modified the config, what you set it as:

Listen 80

In the first example, it’ll only listen on IPv4, in the second, on both IPv4 and IPv6.

@habbywall You need to edit your Apache Vhost configuration, which is located in /etc/apache/sites-enabled/. In the files, you should find the Listen parameter and change it to Listen And then restart Apache with this command sudo service apache restart


If you’re seeing:

caught SIGTERM, shutting down

There’s really only two reasons for that – that’s either from a restart (i.e. you restarted Apache from the command line with something such as service apache2 restart), or Apache is crashing and the service is handling an auto-restart for you.

Since it doesn’t appear to be overly frequent, I wouldn’t think that Apache is crashing, but it could very well be. Accessing Apache over the non-standard ports probably won’t cause it to crash since primary traffic would be routed to 80/443 by default unless you make the other ports known to the public in some way.

I’d take a look at the output of top. I’d run top from the CLI and then hit SHIFT + M, then c, then e. That’ll sort the process listing and make the resource usage human-readable.

The fourth line from the top of top shows memory usage – which you could also get by using:

free -mh

If you can post the output of that command above, while Apache is running, we can take a look at the RAM usage and see if anything looks odd there.

You may very well need to upgrade so that you have more RAM available. Anytime RAM is limited and can not be freed through normal channels, services can begin to crash. Some will try to restart, some won’t – it really depends on the service script.

If it is the service script doing the restarts, that’s not a bad thing, it’s working as intended, but it may be doing it because of a lack of RAM.

Here’s that response:

To                         Action      From
--                         ------      ----
22                         LIMIT       Anywhere                  
443                        ALLOW       Anywhere                  
80                         ALLOW       Anywhere                  
8787                       ALLOW       Anywhere                  
3838                       ALLOW       Anywhere                  
22 (v6)                    LIMIT       Anywhere (v6)             
443 (v6)                   ALLOW       Anywhere (v6)             
80 (v6)                    ALLOW       Anywhere (v6)             
8787 (v6)                  ALLOW       Anywhere (v6)             
3838 (v6)                  ALLOW       Anywhere (v6)             

Note: I previously opened ports 8787 and 3838 as that’s where Shiny Server and R Studio install to, which I have active.

It’s also worth noting, when I go to my IP:8787 or IP:3838 they both work fine, it just seems to be my main IP that isn’t working properly. Could it have to do with me having installed an SSL certificate on the domain names yesterday?

[Fri May 12 06:25:03.452513 2017] [mpm_prefork:notice] [pid 21495] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri May 12 06:25:03.452597 2017] [core:notice] [pid 21495] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 12 22:59:58.252453 2017] [mpm_prefork:notice] [pid 21495] AH00169: caught SIGTERM, shutting down
[Fri May 12 22:59:59.232313 2017] [mpm_prefork:notice] [pid 29167] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri May 12 22:59:59.232383 2017] [core:notice] [pid 29167] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 12 23:03:55.347648 2017] [mpm_prefork:notice] [pid 29167] AH00169: caught SIGTERM, shutting down
[Fri May 12 23:04:34.042060 2017] [mpm_prefork:notice] [pid 1581] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri May 12 23:04:34.043473 2017] [core:notice] [pid 1581] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 12 23:28:29.930075 2017] [mpm_prefork:notice] [pid 1581] AH00169: caught SIGTERM, shutting down
[Fri May 12 23:28:31.058566 2017] [mpm_prefork:notice] [pid 2226] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri May 12 23:28:31.058652 2017] [core:notice] [pid 2226] AH00094: Command line: '/usr/sbin/apache2'


Please post the output of of the following command in a code block.

tail -50 /var/log/apache2/error.log