A site for multi-domain Maintenance Situations
This is used for when we need to disable the entire site and point the DNS somewhere else.
This is an Express JS app that will take URLs and then return the maintenance site based on the url.
You can read an in-depth use case for this on Peter's site. peter.coffee/maintenance-site-with-express-and-pug
Install and running this
$ git clone git@github.com:NaturalPoint/Maintenance-Site.git
$ cd maintenance-mode
npm install
npm start
- This will ask you for your password as the Express server runs on port 80 which requires root.
Testing this locally
To test this locally you can set up host updates. This will make it so that whenever you navigate to a url that you specify it will go to the 127.0.0.1 instead.
This method could also be used to test the production version. Just replace the 127.0.0.1 with the public IP where this Express app lives online.
Setting up your hosts file.
$ cd /etc/
$ sudo nano hosts
- Paste the example below where you feel it makes sense.
- Save and close
control
+x
y
127.0.0.1 www.example.com
127.0.0.1 www.foobar.com
127.0.0.1 www.baz.com
127.0.0.1 example.com
127.0.0.1 foobar.com
127.0.0.1 baz.com