Hey there list-
Has anyone put this together? I''m trying to proxy requests from
an apache 1.4 virtual host to lighttpd running my rails app on
another port. So far I have this going in my virtual host:
<VirtualHost vintnerssecret.com>
ServerName vintnerssecret.com
DocumentRoot /home/users/vintner/cart/public
RewriteEngine On
# ProxyPreserveHost On #<= this doesn''t work for apache 1.3 but
this is what I need
ProxyPassReverse / http://vintnerssecret.com/
RewriteRule ^/(.*) http://vintnerssecret.com:81/$1 [P,L]
</VirtualHost>
So this works for now. And it actually does the right thing for a few
requests showing the url in the browser to be: http://
vintnerssecret.com/whatever/action. Then it will always switch to
http://vintnerssecret.com:81/whatever/action. So this solution while
it technically works and all linke go to their correct pages, the
client is wondering what the hell that :81 thing is doing showing up
in the URL. Anyone have any ideas on how to make this work? Apache 2
is not an option at this point and some googling has turned up some
info about a patch to apache 1.3 to add support for ProxyPreserveHost
On, but I could not actually find the patch, just people talking
about it.
Suggestions?
Thanks-
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
509-577-7732
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
Ezra- I was in a similar situation (couldn''t upgrade to 2.0 at the time) and found the patch for ProxyPreserveHost. I can''t seem to locate the original patch on my system, but I recreated the attached one and I *believe* it is complete. Hope this helps, Ben On 7/19/05, Ezra Zygmuntowicz <ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote:> Hey there list- > Has anyone put this together? I''m trying to proxy requests from > an apache 1.4 virtual host to lighttpd running my rails app on > another port. So far I have this going in my virtual host: > > <VirtualHost vintnerssecret.com> > ServerName vintnerssecret.com > DocumentRoot /home/users/vintner/cart/public > RewriteEngine On > # ProxyPreserveHost On #<= this doesn''t work for apache 1.3 but > this is what I need > ProxyPassReverse / http://vintnerssecret.com/ > RewriteRule ^/(.*) http://vintnerssecret.com:81/$1 [P,L] > </VirtualHost> > > So this works for now. And it actually does the right thing for a few > requests showing the url in the browser to be: http:// > vintnerssecret.com/whatever/action. Then it will always switch to > http://vintnerssecret.com:81/whatever/action. So this solution while > it technically works and all linke go to their correct pages, the > client is wondering what the hell that :81 thing is doing showing up > in the URL. Anyone have any ideas on how to make this work? Apache 2 > is not an option at this point and some googling has turned up some > info about a patch to apache 1.3 to add support for ProxyPreserveHost > On, but I could not actually find the patch, just people talking > about it. > > Suggestions? > Thanks- > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > 509-577-7732 > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ben -
Thank you so much. This is exactly what I needed.
-Ezra
On Jul 19, 2005, at 5:39 PM, Ben Schumacher wrote:
> Ezra-
>
> I was in a similar situation (couldn''t upgrade to 2.0 at the time)
and
> found the patch for ProxyPreserveHost. I can''t seem to locate the
> original patch on my system, but I recreated the attached one and I
> *believe* it is complete.
>
> Hope this helps,
>
> Ben
>
> On 7/19/05, Ezra Zygmuntowicz
<ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote:
>
>> Hey there list-
>> Has anyone put this together? I''m trying to proxy
requests from
>> an apache 1.4 virtual host to lighttpd running my rails app on
>> another port. So far I have this going in my virtual host:
>>
>> <VirtualHost vintnerssecret.com>
>> ServerName vintnerssecret.com
>> DocumentRoot /home/users/vintner/cart/public
>> RewriteEngine On
>> # ProxyPreserveHost On #<= this doesn''t work for apache
1.3 but
>> this is what I need
>> ProxyPassReverse / http://vintnerssecret.com/
>> RewriteRule ^/(.*) http://vintnerssecret.com:81/$1 [P,L]
>> </VirtualHost>
>>
>> So this works for now. And it actually does the right thing for a few
>> requests showing the url in the browser to be: http://
>> vintnerssecret.com/whatever/action. Then it will always switch to
>> http://vintnerssecret.com:81/whatever/action. So this solution while
>> it technically works and all linke go to their correct pages, the
>> client is wondering what the hell that :81 thing is doing showing up
>> in the URL. Anyone have any ideas on how to make this work? Apache 2
>> is not an option at this point and some googling has turned up some
>> info about a patch to apache 1.3 to add support for ProxyPreserveHost
>> On, but I could not actually find the patch, just people talking
>> about it.
>>
>> Suggestions?
>> Thanks-
>>
>> -Ezra Zygmuntowicz
>> Yakima Herald-Republic
>> WebMaster
>> 509-577-7732
>> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
>>
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>> <proxy_preserve_host.patch>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
509-577-7732