View Single Post
  #10  
Old 10th October 2006, 08:39
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,259
Thanks: 76
Thanked 23 Times in 19 Posts
Default

I finally got a second apache2 up and running and am trying to configure the proxy cfg... first of all in /etc/apache/mods-enabled/proxy.conf there is a proxy on/off switch and nobody has ever mentioned if I have to turn it on there, everybody is only talking about these apache directives to set up proxying....

I want the first apache to reverse proxy all images to a second apache2 server listening on port 88 and I found 2 different aproaches till now in this posts:

a)
Quote:
<VirtualHost *:80>
ServerName myrailsdomain.com
ProxyPass / http://totallydifferentdomain.com:<port, if different from 80>/
ProxyPassReverse / http://totallydifferentdomain.com:<port, if different from 80>/
ProxyPreserveHost on
</VirtualHost>
b)
Quote:
ProxyPassReverse / http://%{HTTP_HOST}:8088/
RewriteEngine on
RewriteCond %{REQUEST_URI} !.*\.(gif|png|jpg)$
RewriteRule ^/(.*) http://%{HTTP_HOST}:8088/$1 [P]
would the second example do what I want if I modified it like this:
Quote:
RewriteCond %{REQUEST_URI} .*\.(gif|png|jpg)$
or how should that line look like?
Reply With Quote