admin access password file

262 views
Skip to first unread message

Paolo valleri

unread,
Jun 12, 2013, 2:53:25 AM6/12/13
to web...@googlegroups.com
Hi all, I have to migrate a web2py app to a centos server. It has python 2.6.6, uwsgi 1.9.12.  admin fails saying:

"admin disabled because unable to access password file"

the file (parameters_443.py) is there. I tried to debug the failure and I discover that, despite the fact that I use https, it tries to access parameters_80.py.
Thus, I created the file parameters_80.py but then it fails saying to use https :(.

Paolo



Massimo Di Pierro

unread,
Jun 12, 2013, 9:14:03 AM6/12/13
to web...@googlegroups.com
In the URL, are you using http or https? Assuming you use apache, can you show the config file?

paolo....@gmail.com

unread,
Jun 12, 2013, 10:09:01 AM6/12/13
to web...@googlegroups.com
Hi Massimo, I used https. I expired the same behavior on both apache and nginx.
please find attached the condiguration file of nginx 

 Paolo


2013/6/12 Massimo Di Pierro <massimo....@gmail.com>
--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/1PDpL5yRKMs/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

ds.integreen-life.bz.it.conf

Massimo Di Pierro

unread,
Jun 16, 2013, 4:32:37 AM6/16/13
to web...@googlegroups.com
After

 uwsgi_param     UWSGI_SCHEME $scheme;

you must add

 uwsgi_param     HTTP_X_FORWARDED_PROTO https;

Paolo valleri

unread,
Jun 17, 2013, 10:24:36 AM6/17/13
to web...@googlegroups.com
Hi Massimo, I've just tried but the issue hasn't gone :(
what can I do to debug it more, by who is the request.env.server_port setter ?

Paolo

Massimo Di Pierro

unread,
Jun 17, 2013, 11:46:04 AM6/17/13
to web...@googlegroups.com
I think the port is set by your script: 9001 and it is the same for http and https.

paolo....@gmail.com

unread,
Jun 18, 2013, 3:34:32 PM6/18/13
to web...@googlegroups.com
Massimo I discovered the problem, the server is behind a reserve proxy and this latter wasn't properly configured, namely requests to the external port 443 were directed to the local 80.
Sorry for the troubles!

 Paolo


2013/6/17 Massimo Di Pierro <massimo....@gmail.com>
Reply all
Reply to author
Forward
0 new messages