Hi Massimo!

Here's how I've solved the problem:
I'm now running a web2py local server with regular configuration:
nohup python web2py.py -i 127.0.0.1 -p 8000

Then configured apache2 based on the alternative "mod_proxy" configuration 
described in http://web2py.com/book/default/chapter/13.

This way, apaches deals with the incomming connections on ports 80 and 443 
and then redirects these requests to local web2py default server. This way 
I'm still secure since appadmin and admin are forced to be over HTTPS and 
did no bypasses on codes or whatever. Since I've got other applications 
running in apache, that will be replaced by web2py applications this 
managed to be a good solution and will save me some time when migrating to 
a new application version.

Thanks!





On Thursday, September 13, 2012 6:48:21 PM UTC-3, Massimo Di Pierro wrote:
>
>
> Can you try the full path to certificate files? Are you sure they work?
> Meanwhile you can run admin on port 127.0.0.1 and connect via ssl tunnel.
>
>
> On Thursday, 13 September 2012 09:54:18 UTC-5, Francisco Barretto wrote:
>>
>> Hi There, 
>>
>> I'm trying to use web2py in a ubuntu server without graphic interface so 
>> I need to access the admin page remotely.
>> Started the server with ip 0.0.0.0 and port 8000 and got the message: 
>> "Admin is disabled because insecure channel"
>> I saw some users commenting the above part of access.py (inside admin 
>> app):
>>
>> if request.env.http_x_forwarded_for or request.is_https:
>>     session.secure()
>> elif not request.is_local and not DEMO_MODE:
>>     raise HTTP(200, T('Admin is disabled because insecure channel'))
>>
>> The problem with this kind of approach is that it raises serious security 
>> issues if you want to use it in a real production environment. 
>>
>> So, I tried to set ssh and followed this tutorial: 
>> http://www.web2py.com/AlterEgo/default/show/140
>> Setted up without any errors and started web2py as follows: 
>>  python web2py.py -c server.crt -k server.key -i 0.0.0.0 -p 443
>> (also tried ports 80 and 8000)
>>
>> but it raises the following log:
>>
>> web2py Web Framework
>> Created by Massimo Di Pierro, Copyright 2007-2012
>> Version 2.0.2 (2012-08-30 04:08:18) stable
>> Database drivers available: SQLite3, pymysql, pg8000, IMAP
>> WARNING:web2py:GUI not available because Tk library is not installed
>> choose a password:
>> please visit:
>>     https://0.0.0.0:443
>> use "kill -SIGTERM 1120" to shutdown the web2py server
>> WARNING:web2py:unable to open SSL certificate. SSL is OFF
>>
>> My question is: is there any "right" way to enable remote admin page 
>> access?
>>
>> Thanks, folks!
>>
>

-- 



Reply via email to