I've looked at Apache ErrorDocument directive on how to do this. I found an answer here and it mentioned :
You should use a URL to point to your ErrorDocument otherwise if you use a filesystem reference you will get an additional 503 whilst trying to find it.
So here's how my virtualhost looks like. For test purpose i'm pointing it at Google
<VirtualHost *:80>
ServerName shabbasheep.mydomain.com
ServerAlias www.mydomain.com
ErrorDocument 503 https://www.google.com
...
...
</VirtualHost>
I'm trying to show a maintenance page when my apache server goes down. I'm currently testing this on my local machine before applying it on the live server.
To Test this I stop my apache server and try to access my page hoping the page gets re-directed to the Google Page.
It goes not work :| and I get Firefox can't establish a connection to the server at shabbasheep.mydomain.com.
After doing some further re-search I found a solution that uses RewriteEngine so i went along and added the following to my virtual host.
RewriteEngine On
RewriteCond %{REQUEST_URI} $
RewriteRule $ /https://www.google.com [R=503,L]
Still no luck of redirecting to Google when my server is down. Excuse my understanding on this subject.
Any help on how to solve this is much appreciated.
Thanks in advance