On Sat, 5 Oct 2013 05:05:26 -0700 (PDT) Niphlod <[email protected]> wrote:
> and see where web2py is told to listen on :D I belive it's bug in web2py, iow. how it handles working behind reverse proxy. See the env: HTTP_ACCEPT : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_ENCODING : gzip, deflate HTTP_ACCEPT_LANGUAGE : en,hr;q=0.5 HTTP_CONNECTION : close HTTP_COOKIE : session_id_welcome=93.139.171.186-2c523139-4c5c-4ba9-bc62-ec11a313a6b9; session_id_admin=93.139.171.186-9833e092-1503-4d0d-88b7-df46550d652b HTTP_HOST : atmarama.sites.djangohosting.ch HTTP_REFERER : https://atmarama.sites.djangohosting.ch/admin/default/site HTTP_SCHEME : https HTTP_USER_AGENT : Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 Iceweasel/23.0 FirePHP/0.7.4 HTTP_X_FORWARDED_FOR : 93.139.171.186 HTTP_X_FORWARDED_HOST : atmarama.sites.djangohosting.ch HTTP_X_FORWARDED_PORT : 443 HTTP_X_FORWARDED_PROTO : https HTTP_X_FORWARDED_PROTOCOL : https HTTP_X_INSIGHT : activate HTTP_X_REAL_IP : 93.139.171.186 HTTP_X_REAL_PORT : 93.139.171.186 PATH_INFO : /welcome/default/index QUERY_STRING : RAW_URI : /welcome/default/index REMOTE_ADDR : 93.139.171.186 REMOTE_PORT : 80 REQUEST_METHOD : GET SCRIPT_NAME : SERVER_NAME : atmarama.sites.djangohosting.ch SERVER_PORT : 80 SERVER_PROTOCOL : HTTP/1.0 SERVER_SOFTWARE : gunicorn/18.0 db_sessions : set([]) debugging : False http_accept : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 http_accept_encoding : gzip, deflate http_accept_language : en,hr;q=0.5 http_connection : close http_cookie : session_id_welcome=93.139.171.186-2c523139-4c5c-4ba9-bc62-ec11a313a6b9; session_id_admin=93.139.171.186-9833e092-1503-4d0d-88b7-df46550d652b http_host : atmarama.sites.djangohosting.ch http_referer : https://atmarama.sites.djangohosting.ch/admin/default/site http_scheme : https http_user_agent : Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 Iceweasel/23.0 FirePHP/0.7.4 http_x_forwarded_for : 93.139.171.186 http_x_forwarded_host : atmarama.sites.djangohosting.ch http_x_forwarded_port : 443 http_x_forwarded_proto : https http_x_forwarded_protocol : https http_x_insight : activate http_x_real_ip : 93.139.171.186 http_x_real_port : 93.139.171.186 is_jython : False is_pypy : False is_source : True local_hosts : atmarama.sites.djangohosting.ch ::ffff:127.0.0.1 ::1 s9.wservices.ch 78.46.120.231 127.0.0.1 path_info : /welcome/default/index query_string : raw_uri : /welcome/default/index remote_addr : 93.139.171.186 remote_port : 80 request_method : GET request_uri : /welcome/default/index script_name : server_name : atmarama.sites.djangohosting.ch server_port : 80 server_protocol : HTTP/1.0 server_software : gunicorn/18.0 web2py_version : 2.6.4-stable+timestamp.2013.10.01.15.24.15 local_hosts : atmarama.sites.djangohosting.ch ::ffff:127.0.0.1 ::1 s9.wservices.ch 78.46.120.231 127.0.0.1 web2py_version : 2.6.4-stable+timestamp.2013.10.01.15.24.15 is_https : True is_local : False is_restful : False now : datetime.datetime(2013, 10, 5, 14, 49, 22, 784103) post_vars : raw_args : raw_extension : None url : /welcome/default/index utcnow : datetime.datetime(2013, 10, 5, 12, 49, 22, 784108) uuid : welcome/93.139.171.186.2013-10-05.14-49-22.05a7d131-0ecb-48a5-a062-08d32f14644d vars : It shows that is_https: True and sets: remote_port to 80 ?? I believe that rewriting code in rewrite.py does not handle properly working behind reverse proxy when wsgi is listening on non-standard port and it wouldn't be the first piece of software having such bug - I met several PHP projects with the same problem. Sincerely, Gour -- >From anger, complete delusion arises, and from delusion bewilderment of memory. When memory is bewildered, intelligence is lost, and when intelligence is lost one falls down again into the material pool. 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.

