Forum: Ruby on Rails problem with redirect_to() and VirtualHost

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.
D4d28bd014f9e7324bad99dcc3b0d390?d=identicon&s=25 Rich Morin (Guest)
on 2007-06-21 23:48
(Received via mailing list)
I'm running into a problem with redirect_to() and Apache's
VirtualHost facility.  I have probably have something set up
wrong, but I'm not even sure how to approach the problem.


  We have DNS set up to return the domain's address for all
  sub-domains.  So, "dig" returns the same IP
  address as "dig".

  Our router forwards ranges of port numbers to specified
  machines.  So, a request on port 1234 might go to "fido".

  We are using Apache's VirtualHost facility to redirect (?)
  requests to certain machines, as:

    <VirtualHost *:80>
      ErrorLog          /dev/null
      CustomLog         /dev/null common
      ProxyRequests     Off
      ProxyPass         /
      ProxyPassReverse  /

  As a result, requests to are answered
  by a Rails server that is set up to answer port 1234 on  This (mostly) works fine, both inside and
  outside of the LAN.


  If a user enters an invalid value into a form, we want to
  set up the "flash" hash and redirect back to the page that
  contained the form.  Something like:

    flash[:notice] =  get_errors()

  This works (on the LAN) when the URL of the form page is:

  However, if the URL is:

  the redirect results in:

    Proxy Error

    The proxy server received an invalid response from an
    upstream server.

    The proxy server could not handle the request POST

    Reason: Document contains no data

  The server says:

    [2007-06-21 14:18:42] ERROR URI::InvalidURIError:
    the scheme http does not accept registry part: (or bad hostname?)
    /usr/local/lib/ruby/1.8/uri/generic.rb:729:in `merge'

Any ideas on what might be wrong or (better) how to fix it?

--            Rich Morin     +1 650-873-7841

Technical editing and writing, programming, and web development
This topic is locked and can not be replied to.