Depending on the traffic level and the amount of hardware, I would
recommend against what you just said.  Especially if your current
environment is multiple servers that are load balanced.  You don't
want to have to replicate the environment just to have a construction
page.

Instead of setting up Apache with PHP, just setup a really basic
server with lighttpd and a single static page with really minimum
graphics.  It will serve pages and the one or two graphics a lot
faster and a single server can usually handle the load.

-matt

On 8/24/07, Barry Brimer <[EMAIL PROTECTED]> wrote:
>
>
> On Fri, 24 Aug 2007, Matt Arnilo S. Baluyos (Mailing Lists) wrote:
>
> > Hello everyone,
> >
> > Although we use CentOS primarily on our servers, this query is
> > actually more of a general networking question than something specific
> > to CentOS.
> >
> > In the next week or so, we shall be migrating our in-house servers to
> > a data center. While we're doing that, we'd like to show a "Site down
> > for maintenance" message while the servers that hosts our websites (we
> > have around 15 sites hosted btw), are down.
> >
> > So, how is this accomplished? While I can probably hack something on
> > our name servers, I'm sure there are people on this list that have
> > been doing this and could give some recommendations as to the best
> > practices for this type of task.
>
> I would have DNS for all domains point to a web server that has the
> following php page:
> =========================================================================
> <html>
> <head>
> <title>Maintenance</title>
> </head>
> <body bgcolor=white>
> <font size=5><center>Maintenance</center>
> <br>
> <center>The server that hosts <? $_SERVER['HTTP_HOST'] ?> is currently
> undergoing maintenance.  <? $_SERVER['HTTP_HOST'] ?> will return to full
> service as soon as possible.
> </center>
> </body>
> </html>
> =========================================================================
> I would also add to your httpd.conf file:
> =========================================================================
> RewriteEngine on
> RewriteRule !^/index\.php$ /index.php [NC,L]
> RewriteRule !^/index\.php$ - [F]
> =========================================================================
> This makes it so that anyone who connects to any URL on any of your
> websites will be told that the server they are connecting to is under
> maintenance.
>
> When you have the new server up and running, change DNS.  Alternately you
> could place this on a server in the new location, but change the
> routing/NATing to temporarily deliver the addresses to the server hosting
> this page.  If you are using SSL certificates, you will need to have them
> as well and create different virtualhosts, although they can all have the
> same DocumentRoot and web page.
>
> Hope this helps.
>
> Barry
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to