If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

SSH PORT FORWARDING

You may want to use ssh port forwarding for web2py development. This is because

"web2py is secure"

Since admin gives you r/w rights to database it can not be accessed via plain http.

Good idea is to use two instances of web2py for development purposes.

First instance

python web2py.py -i public_ip -p 80 -a ""

Second instance

python web2py.py -i 127.0.0.1 -p 8001 -a "password"

one instance serves your beta testers and users, the second one runs just for you

There is one more thing to do, we have to esablish a tunnel between our workstation and the server:

ssh -L 8001:127.0.0.1:8001 user@server

the first "8001" is your local port on the machine that runs your browser

the :127.0.0.1:8001 is where you estabilished your web2py instance on the server.

then type:

firefox http://127.0.0.1:8001

or enter the url in your browser.

Related slices

Comments (1)

  • Login to post



  • 0
    paulgerrard 9 years ago
    From a Windows box going to UNIX server, use putty, instead of the command "ssh -L ... " Here how to setup putty: In the Category in 'Connection ->SSH->Tunnels', add 'Source port: 8001' and 'Destination: 127.0.0.1:8001'. Then press the 'Add' button.

Hosting graciously provided by:
Python Anywhere