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.
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> ServerName xyz.cfcl.com ServerAdmin [email protected] ErrorLog /dev/null CustomLog /dev/null common ProxyRequests Off ProxyPass / http://fido.cfcl.com:1234/ ProxyPassReverse / http://fido.cfcl.com:1234/ </VirtualHost>
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() redirect_to(:back)
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 /conf/create. 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: xyz.cfcl.com (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?
Technical editing and writing, programming, and web development