HTTP_X_FORWARDED_HOST breaks Apache proxying

I’m struggling trying to get radiant-0.6.1 installed in a subdirectory.
My current approach is to use an Apache proxy.

I note there are threads starting:

which indicate some other ways this might be done.

For the moment I’m trying the approach suggested in:

which is fairly clean — but I’ve found doesn’t quiet work when
browsing to /admin. I start radiant via either mongrel or webrick, and
have it listen on

The problem is that when Apache forwards the request using proxypass, it
includes the following in the HTML:

HTTP_USER_AGENT: Wget/1.10.2 (Red Hat modified)

This triggers code in
prefer the host named in HTTP_X_FORWARDED_HOST

So if I go http://localhost/radiant/admin, I get a 302 redirect that

HTTP/1.1 302 Moved Temporarily
Date: Thu, 31 May 2007 20:13:11 GMT
Server: Mongrel 1.0.1
Status: 302 Found
Location: http://foo/admin/pages

Where the new location has used HTTP_X_FORWARDED_HOST instead of

I can’t quite figure out what the real problem is.

o Is Apache wrong in including HTTP_X_FORWARDED_HOST ?
I think that’s pretty standard fare, and I can’t see a reason for
Apache not
to include that.

o Should radiant ignore HTTP_X_FORWARDED_HOST ?
Given John L.'s comment in
I suspect this might be the right course of action.

o Is the code in action_controller/cgi_process.rb wrong in all cases?
I’m wondering if using HTTP_X_FORWARDED_HOST can ever be the
right course of action for CGI scripts?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs