0

I have been given the task to make it so when customers try to access their websites while maintenance is taking place (Whether on their website, or taking the whole server offline) they are redirected to a 'landing page' as such.

Is this possible? Sorry I'm extremely new to all of this so don't be too mean! :)

Many thanks, Dan.

DanSan
  • 3
  • 1
  • 2

2 Answers2

0

On your IIS there is a configuration section named Error Pages. There you can configure the http_status codes with the aligned error pages you like. You can either add a file to display or a redirect to another url/path.

Some documentation for IIS7 from technet: Microsoft Technet

JinnFox
  • 84
  • 2
  • Thanks for that, we are okay with when the sites are down now I think, but if the whole server is turned off I don't think this would work? Forgive me if I'm wrong. – DanSan Oct 28 '15 at 14:41
  • If the server is offline, nobody will answer the request of the customer anyway. Then you need a cluster and/or loadbalancing setup. – JinnFox Oct 28 '15 at 18:55
0

The best/official answer is per JinnFox to use a load balancer (or some http proxy). In this solution, a monitor to determine web server health can redirect to any number of places when it determines the server node is not taking HTTP(S) requests. Once the node comes back up and starts responding to the monitor, the load balancer should automatically redirect traffic back.

For my setup I have an F5 BIG-IP that not only monitors the HTTPS port via tcp connectivity, but also validates the X509 certificate and ensures a specific content string is returned (from a working HTML page). So even in the event that the server is still up but handling traffic incorrectly, the hardware load balancer can redirect the traffic wherever I want.

I have an TCL script on the BIG-IP to send it to a CDN 404 page if all servers are down (which shouldn't happen).

I know F5 has a lightweight alternative to the more expensive BIG-IP solution that should do what you want and a bunch more. It's always good to have some application logic existing prior to the web server for these and other scenarios. Or there are free ha-proxy solutions but I don't have experience with scripting within these.

Chase
  • 409
  • 2
  • 8