How to show a maintenance page for website when our network is down

7,444

Solution 1

An offsite reverse proxy that points to your live site could display a default page when the backend site is not available.

Solution 2

I use haproxy for this exact setup. It is hosted on an external Linux VPS. When the proxy system is able to successfully get the health check page on the actual web server, that's what is served to the client. When the health check fails, it serves a static page from an Apache server local to the proxy VPS.

Here is my haproxy.conf:

global
maxconn 4096
daemon
defaults
mode http
clitimeout 60000
srvtimeout 30000
contimeout 4000
option httpclose # Disable Keepalive

listen FarmName 10.9.8.7:80
        mode http
        stats enable
        stats auth admin:Fa2a6eSe
        balance roundrobin
        cookie haCookie insert nocache
        option httpclose
        option forwardfor
        option httpchk HEAD /healthcheck HTTP/1.0
        server active 1.2.3.4:5080 check
        server static-backup 127.0.0.1:80 check inter 500 rise 1 fall 2 backup
Share:
7,444

Related videos on Youtube

SteveBering
Author by

SteveBering

Updated on September 17, 2022

Comments

  • SteveBering
    SteveBering over 1 year

    We host our ASP.NET web sites internally (within our DMZ). When we are doing network maintenance, etc we would like to have our sites display a maintenance page, but our network is down so our hosting servers are off. We don't host our DNS entries (it is handled externally) so we could have a maintenance page hosted externally, but pushing a DNS change for maintenance would take too long. What kinds of solutions could we employ to handle network outages here while still giving our external users some indication that we still exist? What has worked for you and what have you tried?