Forum Moderators: phranque

Message Too Old, No Replies

Need help with server move

         

katwork

7:15 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



I have a client who is moving their servers to a new facility. The servers will be duplicated on new machines at the new location. They have one web server (apache) and one portal server (apache/tomcat/etc). The web server uses mod_jk to send all /portal requests to the portal server. There are a bunch of virtual host entries that map a dozen or so domains to the web root and few that map certain domains to certain sites on the portal.

During the move I need to point ALL web and portal requests (HTTP and HTTPS) to a page on the current web server that says the server is down for maintenance.

I am fairly new to Apache and have been struggling with this for a few days. The only thing I have come up with is to change all the directories to point to the directory with the maintenance page and add ErrorDocument handlers to show the maintenance page for any missing documents. Is there an easier way to do this (maybe using mod_rewrite)? Thanks.

sitz

10:36 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



You mean something what was discussed the other day in this thread?

[webmasterworld.com ]

katwork

10:55 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



I saw that thread, but it is for a specific page on the portal server. I need to trap all requests to all pages on both the web server and portal server. I was going to take the portal server out of the picture by commenting out the JkMount /portal lines and the alias /portal line. That should allow the web server to handle the portal requests (I think).

My solution so far is to change all the DocumentRoots (primary and all virtual hosts) to point to a new /offline directory I made with an index.html file that displays a nice message. Since all requests except for the default page will fail (404 file not found) I was going to add ErrorDocument entries to point to / to display the nice message. This seems like a cludgy way to do this. I was hoping someone could point me to a better way of doing this. Thanks.

sitz

11:07 pm on Mar 29, 2005 (gmt 0)

10+ Year Member



Well, since all requests for /portal (and only those requests, if I understand you correctly) are sent to the portal, using the recipe in the other thread for /portal would handle those requests. If your VirtualHosts are name-based (and maybe even if they're IP-based), you could just comment out all your virtualhosts, point the main server's docroot to a non-existent directory, and set the ErrorDocument 404 accordingly; this saves you the hassle of mucking with umpteen different DocumentRoot directives. =)