On Jan 16, 2014, at 4:32 PM, Rick Mann <rm...@latencyzero.com> wrote:

> I'm trying to update a virtual server that runs a handful of webapps in 
> Resin. The old machine was "tycho.latencyzero.com" and a bunch of DNS entries 
> point to it. The web apps are configured to respond to those varying 
> hostnames. The new machine temporarily has the name "stage.latencyzero.com."
> I copied everything from the old machine to the new, including the resin 
> config file. Obviously, I can't just go to "stage.latencyzero.com", because 
> resin has no idea which webapp I really want.
> Is there any way to configure resin to rewrite a request with a host like 
> "foo.bar.latencyzero.com.stage.latencyzero.com" into a request for the webapp 
> that responds to "foo.bar.latencyzero.com," while keeping the actual hostname 
> intact for the purposes of rendering links in the pages, etc.?

Hi Rick,

I'm not exactly understanding what you want to do, but it sounds like I a 
similar situation I had on one of my sites.  This configuration below is what I 
used.  The new real host is listed first in resin.xml, then the default host 
id="" with host-alias * will catch all, and the redirect regex will redirect to 
the new site while appending the requested URI.

    <host id="foo" root-directory="hosts/foo">

    <host id="" root-directory="hosts/default">
      <web-app id="/" root-directory="webapps/ROOT">
        <resin:Redirect regexp="(.*)" target="http://www.foo.com$1"/>
        <resin:Redirect regexp="(.*)" target="https://www.foo.com$1";>
          <resin:IfSecure value="true"/>

Hope this helps,


> Is there another technique to make this kind of migration easier?
> I did manually edit resin.xml for one of my webapps to respond to 
> "comics.stage.roderickmann.org," and created a DNS entry to match. But it can 
> be tedious to change them all (not too bad, really, just looking for a nicer 
> way).
> Eventually, all the "stage" nonesense will go away and the new machine will 
> completely replace the old and the old will go away.
> -- 
> Rick
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest

Paul Cowan, Software Engineer
Caucho Technology

resin-interest mailing list

Reply via email to