Hello all,

I'm currently using mod_proxy to forward non-static pages to my WEBrick
server for my Rails application.  I'm wanting to setup a second Rails
application on my website, running on a different port number, and I want to
access it via a "directory".

www.mysite.com --> main app
www.mysite.com/other_app --> other app

I tried doing this via a <Location> directive in my site's conf file, but
that didn't seem to work.  Can someone give me some hints as to how to do
this?

Here's what I currently have for my main app:

<VirtualHost *:80>
ServerName ...
DocumentRoot ...

<Directory same/as/doc/root/>
Options ....
AllowOverride ...
Order allow,deny
Allow from All
Deny from None
</Directory>

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from All
</Proxy>

RewriteEngine On
RewriteRule ^/$ /index.html [QSA]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:3001%{REQUEST_URI} [L,P,QSA]
</VirtualHost>

Having this works perfectly for my main Rails application, letting Apache
serve static pages and letting WEBrick serve the scripts.  So what do I need
to do to add another Rails app and proxy requests to the new app when
someone goes to say www.mysite.com/other_app?  I've tried the following:

<Location /other_app>
Order allow,deny
Allow from All

ProxyPass http://127.0.0.1:3002
ProxyPassReverse http://127.0.0.1:3002
</Location>

This, however, did not work.  Thanks in advance!!! -- BTR

Reply via email to