[Locomotive-users] Locomotive and Apache?

Rich Morin rdm at cfcl.com
Sat Jan 20 18:15:33 GMT 2007


At 5:11 PM -0700 1/6/07, Grant Neufeld wrote:
> At 2:47 PM -0800 1/6/07, Rich Morin wrote:
>>Now I'm looking into adding Locomotive to the mix.
> ...
>>I'll be needing to tie Rails into the existing Apache setup.
>
> Here's a (kind of) quick and dirty way (no software installs/builds
> except your existing apache, Locomotive and a simple StartupItem).
> ...

I've been playing with this, quite successfully in general, but I'm
getting some undesirable behavior.  What I'm trying to do is map a
virtual host to different servers, based on the requested URL:

<VirtualHost *:80>
  ServerName       hack.cfcl.com
  ServerAdmin      rdm at cfcl.com
  ErrorLog         /dev/null
  CustomLog        /dev/null common
  ProxyRequests    Off
  ProxyPass        /play  http://192.168.1.205:3000
  ProxyPassReverse /play  http://192.168.1.205:3000
  ProxyPass        /      http://192.168.1.205/hack
  ProxyPassReverse /      http://192.168.1.205/hack
 </VirtualHost>

This resolves URLS as follows:

  http://hack.cfcl.com/

    maps to port 80 (Apache) and the "hack" directory

  http://hack.cfcl.com/play/monkeys/list

    maps to port 3000 (Locomotive)

The "undesirable behavior" is that the "Address" line in my web
browser is displaying "http://cerberus.cfcl.com/hack/" in the
first (Apache) case.  I'd much prefer that it just show the URL
as entered.  Help?

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     rdm at cfcl.com
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development


More information about the Locomotive-users mailing list