I've created a site to test out my downtime alerts system (using pingdom.com)

I want to disable the site occasionally to ensure that pingdom is working and sending me alerts.

However, disabling the site doesn't trigger a DOWN event, because the URL returns a HTTP 302 Moved Temporarily code (which is not considered a failure) and then after the redirect, you land on http://hostmaster/hosting/disabled/DOMAIN, which returns a HTTP 200 Success code.

This makes external systems think the site is just fine.

I think we should change the response code on hosting/disabled/DOMAIN to something like 403 Access Denied to more accurately reflect the situation.

Comments

Jon Pugh created an issue. See original summary.

colan’s picture

Makes sense to me.

helmo’s picture

+1

jon pugh’s picture

While we're at it, it's terrible that this redirects disabled sites to hostmaster at all! Why would we want to reveal the location of the hostmaster for the disabled site?

We should have more control over what happens to disabled sites.

A few good options I can think of:

  1. Redirect to [ ] (defaults to your hostmaster, at this point the "expected" behavior.
  2. Hide. Completely removes apache config so it appears as if the site was never there.
  3. Return HTML file [/var/aegir/config/disabled.html]. Returns this file when the URL is requested. We can use DirectoryIndex and DocumentRoot to point to any file
colan’s picture

I completely agree with you on revealing the hostmaster site. I already mentioned this in #2724273: Disabled Nginx sites return 404 instead of "Disabled" message actually. Should it be its own issue?

There's an old issue that deals with making this stuff configurable. Not sure if this would be a duplicate of that, or if we should keep these separate: #269743: Configurable site disabled and site maintenance splash pages..