Some one on quora just told me a better way to do it for nginx.
http://www.quora.com/How-do-you-get-pylons-to-recognize-the-base-url-is-not-the-local-machine-if-requests-are-being-proxied-from-another-server?__snids__=1614443%2C1614463

it basically says:

in the location section of nginx:
proxy_set_header Host $host;

He also pointed out that to get the user's ip you can add:
proxy_set_header X-Real-IP $remote_addr;

I assume there are similar things for the other headers and the other
servers (apache etc).

Hope that help,
Jeremy


On Jul 15, 9:50 pm, Robert Forkel <[email protected]> wrote:
> hi,
> right now i use a custom url function to create full absolute urls,
> i.e. i overwrite pylons.url appending scheme and host (which i pull
> from my config). but i'd be interested too, whether there's a better
> way.
> regards,
> robert
>
> On Fri, Jul 16, 2010 at 5:04 AM, jkarmel <[email protected]> wrote:
> > Hey all,
> > I am proxying my requests through nginx while paster listens on port
> > 9000. The problem is when pylons calculates links the links come out
> > ashttp://127.0.0.1:9000/blah/blahinstead ofhttp://mywebsite.com/blah/blah.
> > What's the best way to fix this problem?
> > Thanks so much
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "pylons-discuss" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/pylons-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to