Forum: Radiant CMS HTTP_X_FORWARDED_HOST breaks Apache proxying

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bbb08090c4f8d7f89d9f474e9d57ba94?d=identicon&s=25 Earl Chew (Guest)
on 2007-06-02 05:57
(Received via mailing list)
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 Long'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 topic is locked and can not be replied to.