httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Howard <>
Subject Re: [users@httpd] Need help with VirtualHost/forwarding
Date Thu, 12 Aug 2010 16:33:28 GMT
On Thu, Aug 12, 2010 at 10:37, Mike Soultanian <> wrote:

>>> server - the problem is that it can't be done for another couple weeks
>>> (IT
>>> department won't do it right away as it involves restarting all of the
>>> servers and a whole change management process).
>> Remind me to not ever set up any kind of change management processes
>> like that.  Sounds like IT is "top heavy".
> Heh - yeah, kinda frustrating.  The guy that is doing the Apache config is
> going on vacation, so we have to wait until he comes back (a couple weeks)
> before the change can be made.

No backup staff ... ouch.

> From what they've told me, they restart all 32 instances served by their 3
> clustered servers, so the downtime is minimal, but this is a production
> environment so taking down something like the campus web server needs to go
> through their Change Management process.  It's actually not that bad (except
> in this particular situation) because they send out a notification to the
> involved parties (the entire campus, in this case) so that everyone knows
> what's happening and people don't freak out when something isn't working.

If they have load balancing, the restarts can be made transparent.
Just disable the server from the load balancer, wait the prescribed
time (usually just a few seconds), reboot the machine or restart the
service, then enable the server back into the load balancer.  Just
don't do this during the peak loads when total capacity is in use.

Otherwise, they need a nightly restart window.

> That machine isn't running php and I really don't want to figure out how to
> install it and get everything configured.  Believe me, I could, but time's
> an issue and this needs to work today (Thursday).  I already have Apache
> running and it's stable and I just need this setup to work for another two
> weeks without any lost sleep.  That's why I figured the easiest thing to do
> is just forward everyone over to the main server until we're able to make
> the VirtualHost change on the main server and then make the final update to
> the (www.) DNS entry.

So what is the plan to get people out of later on?  Make it be a redirect
back to once it is running as a VirtualHost on
the central server?

> So I was playing around and came up with this:
> <VirtualHost *:80>
> ServerName
> RewriteEngine on
> RewriteRule (.*) [R=permanent]
> </VirtualHost>
> REAL DNS (goes live sometime on Thursday):
> <VirtualHost *:80>
> ServerName
> RewriteEngine on
> RewriteRule (.*) [R=permanent]
> </VirtualHost>
> <VirtualHost *:80>
> ServerName
> RewriteEngine on
> RewriteRule (.*) [R=permanent]
> </VirtualHost>
> The first one is just a test to make sure it was working correctly (that DNS
> will be removed later today).  In a couple hours (www.) should
> be updated and the second two will go into effect.  I had initially done it
> with the Redirect directive, but I found that RewriteRule saves all the
> arguments after the ?  (but drops the filename) which is really helpful
> (they're the same for both the php and ColdFusion versions of our software).

Why permanent?  If someone bookmarks the permanent, it will save the
redirect target.  Since you are later going to change back, you should
want bookmarks to save the temp URL.  That (temp) is supposed to be
the default.

Another option is to proxy the requests.  Then no one sees the
alternate temporary URL.  The downside is the traffic gets heavier.

> Is there any way to combine the last two entries into one so that the
> VirtualHost will respond to both and

<VirtualHost *:80>

sHiFt HaPpEnS!

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message