need to ProxyPass to other virtual host

Alles, was den Apache betrifft, kann hier besprochen werden.

need to ProxyPass to other virtual host

Postby jeanluca » 06. November 2008 22:35

Hi All

I have 2 virtualHost; 1) for my website and 2) my Ruby on Rails project

For example, my URL is example.com. When I get a request like
http://example.com/ror

I want to proxy it to the Ruby on rails virtualhost (ror.local). I tried the following:

<VirtualHost *:80>
ServerName example.com
....
ProxyPreserveHost On
#ProxyPass /ror http://ror.local
ProxyPassReverse /ror http://ror.local
...
</VirtualHost>

<VirtualHost *:80>
ServerName ror.local
DocumentRoot /srv/backend/public
ErrorLog logs/backend.local-error_log
CustomLog logs/backend.local-access_log common
#RailsEnv production
RailsEnv development
RailsAllowModRewrite off
<directory "/srv/backend/public">
Order allow,deny
Allow from all
</directory>
</VirtualHost>

I've added ror.local to /etc/hosts. So I can access both virtual hosts, but the proxy stuff doesn't work

Any suggestions ?

thnx
LuCa
jeanluca
 
Posts: 1
Joined: 06. November 2008 22:26

Re: need to ProxyPass to other virtual host

Postby glitzi85 » 10. November 2008 17:30

jeanluca wrote: #ProxyPass /ror http://ror.local

You disabled the ProxyPass and now you are wondering why it does not work?

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to Apache

Who is online

Users browsing this forum: No registered users and 218 guests