I want to run a rails app behind a mod_proxied apache web server. So I
need to tell rails to create urls for the frontend web server instead of
the hostname:port (localhost:3000 in this case) it really is listening
on. I haven’t found a way to configure rails to do this.
I have hacked rewrite_url for a temporary fix like this atm:
alias old_rewrite_url rewrite_url
def rewrite_url(path, options) url = old_rewrite_url(path, options) url.gsub!(/a.do.main:3000/, 'b.do.main') url end
But I think it would be useful if rails offered this via a configuration
option for similar cases. What do you think?