Camping uses the Host-header to figure out where the app is located, and
Apache *should* carry forward the header to the Mongrel. How have you set
this up?
If you're using Camping 1.9 or running this through Rack, you could always
create a middleware which changes the Host-header:
class Thing
def initialize(app, options = {})
@app = app
end
def call(env)
@app.call(env.merge({ 'HTTP_HOST' => 'my_vhost.net' }))
end
end
app = Thing.new(app)
-------
I also believe Apache is able to modify HTTP-headers.
//Magnus Holm
On Tue, May 19, 2009 at 15:31, David Susco <[email protected]> wrote:
> Not sure if this list is still active but I haven't found another yet,
> here's my setup and question.
>
> * I'm running a camping app using a mongrel server listening at 127.0.0.1:
> X.
> * I have a virtual host setup in Apache that is rewriting
> my_vhost.net/my_app/ to 127.0.0.1:X.
> * In one of my controllers I'm trying to redirect to another
> controller like this: redirect Index
> * Instead of being directed to my_vhost.net/my_app/ though the user is
> directed to 127.0.0.1:X.
>
> What's the best/cleanest way to get around this and have the
> controller redirect to my_vhost.net/my_app/?
>
> --
> Dave
> _______________________________________________
> Camping-list mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/camping-list
>
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list