OPENid problem with trust_root when rails app running behind apache load balancer

Hi I am in the process of setting up open id for my website and there
is one thing that I just cannot figure out.

When I run it on my development instance I get it working with out a
problem but when I run it on my production I have a problem with my
trustroot. This is what I get on the open id provider side.

Not under trust_root u'http://127.0.0.1:8000' the trusted root should
be the domain it's coming from I assume.
I suspect this is happening because I am using apache to load balance
between a couple of mongrel instances. I have been trying to set the
trust_root manually but cannot wrap my head around how that is done.

Any ideas?