Re: [Resin-interest] "Rewriting" hostnames across webapps?
Yep, I think it would. The problem is, what if I want a more complex transformation next time? Or just a different string other than "stage" inserted? It's okay, this works well enough for me now. On Jan 17, 2014, at 15:24 , Chris Pratt wrote: > Wouldn't adding "(stage\.)?" to each host-alias-regexp and changing the > host-name to regexp allow it to work as you want it? For example: > > root-directory="/lz/var/www/com/latencyzero"> > > ^tycho.(stage\.)?latencyzero.com[\.]?$ > > ^(www\.)?(stage\.)?latencyzero.com[\.]?$ > > > > > On Fri, Jan 17, 2014 at 3:18 PM, Rick Mann wrote: > > On Jan 17, 2014, at 06:05 , Paul Cowan wrote: > > > > > On Jan 16, 2014, at 4:32 PM, Rick Mann 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. > > > > > > .*foo.com > > … > > > > > > > > * > > > > http://www.foo.com$1"/> > > https://www.foo.com$1";> > > > > > > > > > > > > Hope this helps, > > Hmm, not sure. Basically, I have entries in resin.xml on machine > "tycho.latencyzero.com" like this: > > root-directory="/lz/var/www/com/latencyzero"> > ^tycho.latencyzero.com[\.]?$ > ^(www\.)?latencyzero.com[\.]?$ > > > > root-directory="/lz/var/www/org/roderickmann/comics"> > comics.roderickmann.org > > > > root-directory="/lz/var/www/org/roderickmann/www"> > ^(www\.)?roderickmann.org[\.]?$ > ^(www\.)?rickmann.org[\.]?$ > > > > root-directory="/lz/var/www/org/roderickmann/mgfb"> > ^mgfb\.roderickmann.org[\.]?$ > ^blog\.roderickmann.org[\.]?$ > > > > I have DNS entries for all of the above that are all CNAMEs to > tycho.latencyzero.com. > > I want to move all of those apps to a new machine (upgrading hardware and > OS), but I want to test it first. The machine is called > stage.latencyzero.com, and I need to make new DNS entries for each webapp > (perhaps adding "stage" to each name, or something). The most straightforward > thing would be simply to modify each name to add "stage" to them, but then > when I decide to make the new machine permanent, and change all the old DNS > entries to point to the new IP address, I'd have to modify the entries. > > Or I could simply add host-aliases for all the new names. > > But I was hoping there'd be a trick so that I only have to modify one line, > and each of the host entries would pick it up. I realize that might require > me to modify all the entries once (as you did with your redirects). But once > I do this once, it should work for similar changes in the future. > > One thing I need to preserve: if I'm hitting one of my webapps through the > new name (e.g. "stage.mgfb.roderickmann.org" or whatever), when code in the > webapp uses the host name to render URIs, it needs to use that same hostname, > so that links point to the right place, and not back to the old instance. > > All this discussion, of course, has taken longer than it would have to simply > modify the entries a couple times, but I was curious. > > Thanks, > Rick > > > ___ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest > > > ___ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/lis
Re: [Resin-interest] "Rewriting" hostnames across webapps?
Wouldn't adding "(stage\.)?" to each host-alias-regexp and changing the host-name to regexp allow it to work as you want it? For example: ^tycho.(stage\.)?latencyzero.com[\.]?$ ^(www\.)?(stage\.)?latencyzero.com[\.]?$ On Fri, Jan 17, 2014 at 3:18 PM, Rick Mann wrote: > > On Jan 17, 2014, at 06:05 , Paul Cowan wrote: > > > > > On Jan 16, 2014, at 4:32 PM, Rick Mann 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. > > > > > > .*foo.com > > … > > > > > > > > * > > > > http://www.foo.com$1"/> > > https://www.foo.com$1";> > > > > > > > > > > > > Hope this helps, > > Hmm, not sure. Basically, I have entries in resin.xml on machine " > tycho.latencyzero.com" like this: > > root-directory="/lz/var/www/com/latencyzero"> > ^tycho.latencyzero.com > [\.]?$ > ^(www\.)?latencyzero.com > [\.]?$ > > > > root-directory="/lz/var/www/org/roderickmann/comics"> > comics.roderickmann.org > > > > root-directory="/lz/var/www/org/roderickmann/www"> > ^(www\.)?roderickmann.org > [\.]?$ > ^(www\.)?rickmann.org[\.]?$ > > > > root-directory="/lz/var/www/org/roderickmann/mgfb"> > ^mgfb\.roderickmann.org > [\.]?$ > ^blog\.roderickmann.org > [\.]?$ > > > > I have DNS entries for all of the above that are all CNAMEs to > tycho.latencyzero.com. > > I want to move all of those apps to a new machine (upgrading hardware and > OS), but I want to test it first. The machine is called > stage.latencyzero.com, and I need to make new DNS entries for each webapp > (perhaps adding "stage" to each name, or something). The most > straightforward thing would be simply to modify each name to add "stage" to > them, but then when I decide to make the new machine permanent, and change > all the old DNS entries to point to the new IP address, I'd have to modify > the entries. > > Or I could simply add host-aliases for all the new names. > > But I was hoping there'd be a trick so that I only have to modify one > line, and each of the host entries would pick it up. I realize that might > require me to modify all the entries once (as you did with your redirects). > But once I do this once, it should work for similar changes in the future. > > One thing I need to preserve: if I'm hitting one of my webapps through the > new name (e.g. "stage.mgfb.roderickmann.org" or whatever), when code in > the webapp uses the host name to render URIs, it needs to use that same > hostname, so that links point to the right place, and not back to the old > instance. > > All this discussion, of course, has taken longer than it would have to > simply modify the entries a couple times, but I was curious. > > Thanks, > Rick > > > ___ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest > > ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] "Rewriting" hostnames across webapps?
On Jan 17, 2014, at 06:05 , Paul Cowan wrote: > > On Jan 16, 2014, at 4:32 PM, Rick Mann 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. > > > .*foo.com > … > > > > * > > http://www.foo.com$1"/> > https://www.foo.com$1";> > > > > > > Hope this helps, Hmm, not sure. Basically, I have entries in resin.xml on machine "tycho.latencyzero.com" like this: ^tycho.latencyzero.com[\.]?$ ^(www\.)?latencyzero.com[\.]?$ comics.roderickmann.org ^(www\.)?roderickmann.org[\.]?$ ^(www\.)?rickmann.org[\.]?$ ^mgfb\.roderickmann.org[\.]?$ ^blog\.roderickmann.org[\.]?$ I have DNS entries for all of the above that are all CNAMEs to tycho.latencyzero.com. I want to move all of those apps to a new machine (upgrading hardware and OS), but I want to test it first. The machine is called stage.latencyzero.com, and I need to make new DNS entries for each webapp (perhaps adding "stage" to each name, or something). The most straightforward thing would be simply to modify each name to add "stage" to them, but then when I decide to make the new machine permanent, and change all the old DNS entries to point to the new IP address, I'd have to modify the entries. Or I could simply add host-aliases for all the new names. But I was hoping there'd be a trick so that I only have to modify one line, and each of the host entries would pick it up. I realize that might require me to modify all the entries once (as you did with your redirects). But once I do this once, it should work for similar changes in the future. One thing I need to preserve: if I'm hitting one of my webapps through the new name (e.g. "stage.mgfb.roderickmann.org" or whatever), when code in the webapp uses the host name to render URIs, it needs to use that same hostname, so that links point to the right place, and not back to the old instance. All this discussion, of course, has taken longer than it would have to simply modify the entries a couple times, but I was curious. Thanks, Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] PHP iconv?
Hi Rick, It's a CURL SSL client certificate problem. But because Quercus is using JSSE for the SSL, we cannot support CURL's way for specifying SSL certificates. We do want to replace JSSE with Apache HttpClient. But since Quercus is 100% Caucho code, the question then becomes: "how do we want to bundle third-party code". I have filed a bug report and expect to have this issue resolved quickly: http://bugs.caucho.com/view.php?id=5634 -- Nam On 1/16/14, 10:00 AM, resin-interest-requ...@caucho.com wrote: > Send resin-interest mailing list submissions to > resin-interest@caucho.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://maillist.caucho.com/mailman/listinfo/resin-interest > or, via email, send a message with subject or body 'help' to > resin-interest-requ...@caucho.com > > You can reach the person managing the list at > resin-interest-ow...@caucho.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of resin-interest digest..." > > > Today's Topics: > > 1. PHP iconv? (Rick Mann) > > > -- > > Message: 1 > Date: Wed, 15 Jan 2014 22:18:06 -0800 > From: Rick Mann > Subject: [Resin-interest] PHP iconv? > To: General Discussion for the Resin application server > > Message-ID: <20a4f04a-541b-4b55-9be6-7cdd714c6...@latencyzero.com> > Content-Type: text/plain; charset="us-ascii" > > I just updated my WordPress 2.9.2 installation to 3.8. After some difficulty > (auto upgrade didn't work), it's mostly working, but I'm getting some errors. > One is this: > >> wp-includes/class-http.php:1163: Warning: CURL option '10065' unknown or >> unimplemented >> >> RSS Error: The data could not be converted to UTF-8. You MUST have either >> the iconv or mbstring extension installed. Upgrading to PHP 5.x (which >> includes iconv) is highly recommended. > > I have resin 4.0.37. Is this really a PHP problem, or my CURL? > > Thanks, > ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] "Rewriting" hostnames across webapps?
On Jan 16, 2014, at 4:32 PM, Rick Mann 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. .*foo.com … * http://www.foo.com$1"/> https://www.foo.com$1";> Hope this helps, -Paul > > 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 co...@caucho.com http://blog.caucho.com http://twitter.com/cauchoresin ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest