How do I setup a web page to show "Under Maintenance" while my Linode is being resized?

Linode Staff

My Linode is going to be shutdown for while it is being resized and I'd like my customers to get a message explaining what is going on while this is happening. I don't want to change my DNS settings. Is there a way I can do this?

1 Reply

With a little forethought, this is relatively straight forward:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install apache2
sudo a2enmod alias
sudo nano /etc/apache2/sites-enabled/000-default.conf
  • Edit the default configuration (add the following lines after your "DocumentRoot" line:
   AliasMatch ^/(.*)$ /var/www/html/index.html
   ErrorDocument 404 /var/www/html/index.html
  • Edit /var/www/html/index.html to show the error page you want. (If you don't feel like manually creating your own maintenance page, you can use https://better-error-pages.statuspage.io to generate an error page. Disclaimer: this site is not affiliated with Linode.com)

  • Start your webserver:

sudo systemctl enable apache2
sudo systemctl start apache2
  • Use the transfer IP address feature in the Cloud Manager to swap you Linode's IP address with the new server

  • Shutdown your original Linode

  • Reboot your new temporary Linode to pick up the new IP address

  • Perform your maintenance

  • Use the transfer IP address feature again to move your IP address back to the original Linode.

  • Shutdown your temporary Linode

  • Boot your original Linode

  • You can now delete the temporary Linode or use the Linode Images feature to keep a copy of your maintenance Linode ready to deploy again if you ever need to do maintenance in the future.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct