Experiencing a lot of downtime

I’m using to measure the uptime of my server. Unfortunately it goes down a lot! Almost twice a day for maybe just one to two minutes. I can’t find anything in my logs and am completely lost what is going wrong. I’ve looked at all log files and can’t find anything out of the ordinary (apart from the 301 responses from I have no clue what to look for now.

I’m using Varnish on port 80, Nginx on port 443 and Apache on port 8080. Both ports 80 and 443 are open. When I go to my site ( on all possible URL’s, I just get there, so the configuration seems to be working correctly.

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Jonathan Tittle
DigitalOcean Employee
DigitalOcean Employee badge
July 14, 2017
Accepted Answer


My initial thought would be that NGINX isn’t passing on the headers that you’re targeting when it proxies a request. In addition to proxy_pass, I normally run the following configuration:

        proxy_buffers 16 32k;
        proxy_buffer_size 64k;
        proxy_busy_buffers_size 128k;
        proxy_cache_bypass $http_pragma $http_authorization;
        proxy_connect_timeout 59s;
        proxy_hide_header X-Powered-By;
        proxy_http_version 1.1;
        proxy_ignore_headers Cache-Control Expires;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
        proxy_no_cache $http_pragma $http_authorization;
        proxy_pass_header Set-Cookie;
        proxy_read_timeout 600;
        proxy_redirect off;
        proxy_send_timeout 600;
        proxy_temp_file_write_size 64k;
        proxy_set_header Accept-Encoding '';
        proxy_set_header Cookie $http_cookie;
        proxy_set_header Host $host;
        proxy_set_header Proxy '';
        proxy_set_header Referer $http_referer;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Original-Request $request_uri;

The above is pulled from my own configuration that I’ve used for some time in various setups (which includes WordPress behind a proxy).

I’d recommend testing that out and seeing if that helps. You’d want to restart NGINX once the changes are in place. From there, I’d be happy to check on my end to see if that resolves the issue I’m seeing on my end.

If it doesn’t work, I’d check the logs to see if there’s anything more than we can pinpoint.

tail -20 /var/log/nginx/error.log
Jonathan Tittle
DigitalOcean Employee
DigitalOcean Employee badge
July 15, 2017


From what I can see on my end, things are looking good :-) – looks like it’s loading in less than a second on my end.

Jonathan Tittle
DigitalOcean Employee
DigitalOcean Employee badge
July 14, 2017


When I visit your website, I’m seeing an error:

Too many redirects

… which would be a configuration issue that would, in most cases, be detected as downtime since it prevents your site from being displayed as expected.

1). Are you using Varnish + Apache, or Varnish + NGINX + Apache?

2). What kind of site is this (i.e. WordPress, static, NodeJS, etc)?

3). Are you using anything else in front (i.e. CloudFlare)?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel