Welcome! Log In Create A New Profile

Advanced

Nginx + Python, uwsgi - Behind Multiple Proxies

Posted by onovaes 
Nginx + Python, uwsgi - Behind Multiple Proxies
April 21, 2012 10:49AM
Use in programming (Python / Django) a method HttpRequest.get_host () (# https://docs.djangoproject.com/en/dev/ref/request-response/ django.http.HttpRequest.get_host) but this method fails when the host is behind multiple proxies. In my application redirect some subdomains for her, and through the method mentioned recognize the subdomain in question.

Normally operates. The former method get the URI. (like [url]classificados.fatimanews.com.br[/url], [url]classificados.bonitoinforma.com.br[/url]) but today I created a subdomain ([url]classificados.portalaguasclaras.com.br[/url]), pointed to the IP of the machine, as I always do, and it happens that this time the method returns the IP of the machine and not the URL for me to identify it.

I use nginx. What would it take? Could you help me?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready