why don't you just enable remote forwarding if you don't want to setup the 
SSL on the webserver ?

if you can log in with ssh, you should be able to do:

ssh -L local_port:local_ip:remote_port username@address

This, in addition to login to the ssh shell, will redirect the services 
listening on the remote_port on the server address to the local_port 
residing on local_ip.

summary: if you have a server and you login in it by 
ssh [email protected] 

you can instead use

ssh -L 8000:localhost:80 [email protected]

This will make what is available on port 80 of example.com accessible from 
localhost:8000 . 

Summary of the summary: if you point your local browser to 
http://localhost:8000/admin (if your server has a standard web2py config), 
for the server it is like someone is using a browser right on the server 
pointing to http://localhost:80/admin (hence, request is detected as coming 
from localhost and no https check is enforced, like you are used when you 
start web2py to develop on your own computer)

On Thursday, September 13, 2012 3:38:45 PM UTC+2, Francisco Barretto wrote:
>
> Hi There!
>  
> Deploying web2py on a server gives me some headache about accessing the 
> admin page (on server) from a remote machine. First it throwed the message 
> "'Admin is disabled because insecure channel'. So I found some posts 
> talking about comment the following code
>  
>                        
> 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'))
>
> Unfortunatelly, commenting, this part of the access.py file is not the 
> right way to do it and I know. Besides, it still shows-me this message 
> "ATTENTION: Login requires a secure (HTTPS) connection or running on 
> localhost". So, it´s not apropriate and doesn´t even solve the problem.
>  
> Since I´m using linux as my server OS and it doesn´t have a graphic 
> interface I can´t access the admin page through a local browser. My point 
> is, how to correctly enable the admin page remote access? Already tryed to 
> start with the server IP and 0.0.0.0 using ports 8000, 80 and 443 and still 
> nothing. Also tryied to specify the protocol HTTPS on browser but I get 
> this error:
>  
>  SSL received a record that exceeded the maximum permissible length.     
>                      
>                           
> (Error code: ssl_error_rx_record_too_long)             
>
> So, can anybody point me the right way?
>  
> Thanks!
>

-- 



Reply via email to