Matt Arnilo S. Baluyos (Mailing Lists)
2007-Aug-24 03:15 UTC
[CentOS] "Site down for maintenance" - How is this accomplished?
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. Thanks in advance, Matt -- Stand before it and there is no beginning. Follow it and there is no end. Stay with the ancient Tao, Move with the present.
Feizhou
2007-Aug-24 03:30 UTC
[CentOS] "Site down for maintenance" - How is this accomplished?
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.Keep or setup a box inhouse to show the message, when the servers are online in the data center, switch ips for the names over and then change the setup on the box to either redirect or proxy the requests to the real servers to handle incoming http requests due to cached dns entries.
Barry Brimer
2007-Aug-24 04:21 UTC
[CentOS] "Site down for maintenance" - How is this accomplished?
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
Ross S. W. Walker
2007-Aug-24 14:02 UTC
[CentOS] "Site down for maintenance" - How is this accomplished?
> -----Original Message----- > From: centos-bounces at centos.org > [mailto:centos-bounces at centos.org] On Behalf Of Matt Arnilo > S. Baluyos (Mailing Lists) > Sent: Thursday, August 23, 2007 11:15 PM > To: CentOS Mailing List > Subject: [CentOS] "Site down for maintenance" - How is this > accomplished? > > 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.Some Domain Registrars can also present that for you as part of the name registration. In which case, if the registrar's setup is good, they can present this to public traffic without you needing to setup a redirect on your own network. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.