Hi again,
I've discovered the solution.

# proxy for TG2
location / {
    proxy_pass          http://cluster;
    proxy_redirect      off;
    # Gunicorn documentation example (it works!)
    proxy_set_header    Host $http_host;
    # TG2 documentation example (it doesn't work...)
    #proxy_set_header    Host $host;
    proxy_set_header    X-Real-IP $remote_addr;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
 }

The thing is that I've succesfully deploy TG2 through NGINX+Gunicorn
one hour ago. My previous choice was Paster and I didn't find anything
about this problem.

Gunicorn site gives an example which is very similar to the TG2 docs
one with Paster
http://gunicorn.org/deploy.html

Thanks anyway!

On Nov 1, 10:13 am, León Domingo <[email protected]> wrote:
> Hi everyone,
> I'm lately deploying (or trying to) my TG2 apps through NGINX
> +gunicorn. It's the same thing described here:
>
> http://turbogears.org/2.1/docs/main/Deployment/nginx/load_balance.htm...
>
> but using Gunicorn instead of Paster.
>
> Everything's ok but one little thing I can't resolve.
>
> If the app is deployed (the NGINX load balancer is running) at the
> standard web port (80) everything works fine, but if i try to use
> another port I have problems when I use redirect(...). I have the same
> problem when I used Paster and nothing happens when I use Apache
> +mod_wsgi (this is my current deployment method).
>
> it's probably a NGINX proxy configuration problem, but I liked to ask
> here before to avoid a lot of explanation to the NGINX people.
>
> Does anyone try this sort of deployment?
>
> Thanks
>
> León

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to