uhm.... just my 2 cents....

If cert is loaded incorrectly in nginx all pages with https are reported to 
the browser as "insecure" but web2py should not complain about an insecure 
channel (web2py doesn't check for cert validation)

maybe nginx is not passing the "https" variable to uwsgi, and then it does 
not pass it to web2py ....
the relevant code in appadmin is

if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
     in ['https', 'HTTPS']:
    session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
    raise HTTP(200, T('appadmin is disabled because insecure channel'))

Now, if request.end.http_x_forwarded_for is not set or 
request.env.wsgi_url_scheme is not set.....you get that error.

try to "print" request.env.wsgi_url_scheme somewhere and see if for https 
requests is "https" or "HTTPS"

In my experience this was the problem indeed.......
my snippet:

location ~ ^/plaza/(.*) {
    uwsgi_pass unix:/tmp/w2p_app.sock;
    include /etc/nginx/uwsgi_params; #this include all the "normal" params 
except from scheme, so I include it in the next line
    uwsgi_param UWSGI_SCHEME $scheme;
}

and voilĂ  (I hope also for you) ;-D

Niphlod

Reply via email to