On Sat, 5 Oct 2013 11:47:36 -0700 (PDT) Niphlod <[email protected]> wrote:
> are you sure that is the only one gunicorn instance running in your > env ? if yes, do you access web2py using 127.0.0.1:62019 ? Yes, 127.0.0.1:62019 is the port gunicorn is listening on. > if remote_port is set to 62019, then the instance you're accessing is > the right one. > If it's instead 80, something else is running web2py that reports > remote_port as 80. Or web2py is setting remote_port to 80 itself? > web2py looks for remote_port to look for the parameters_xxx.py file, > not http_x_forwarded port. OK. > What does inspect and "trust" is instead http_x_forwarded_proto to > tell if the request is an https one (meaning that even if the > "lowest-middleware" is not doing any SSL secured transmission, if > there is that header it means that on the layers on top (probably > nginx in your setup) the connection is secure). This is a pretty > standard behaviour in any piece of software working on reverse > proxies because there is no other way for the "lower tiers" to know > if the connection is secured or not from the "upper tiers". Well, on the same hosting, iow. same nginx at the front-end, I run few PHP sites which are served by Hiawatha web serving also listening on similar localport. If I try simple test.php script, no matter which port is forwarded, iow. no matter whether I use http/https to access the script, phpinfo() reports that SERVER_PORT = localport where Hiawatha server is listening and all the apps are working as expected. E.g. in #flask I'm told: "Flask works fine behind remote proxies but you do need to take care of setting the Host and X-Forwarded-For headers correctly." I'll try to research more and check nginx setup, although it works with all the other apps. Sincerely, Gour -- While contemplating the objects of the senses, a person develops attachment for them, and from such attachment lust develops, and from lust anger arises. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 -- A person is said to be elevated in yoga when, having renounced all material desires, he neither acts for sense gratification nor engages in fruitive activities. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

