gevent and admin app

65 views
Skip to first unread message

Arnon Marcus

unread,
Dec 29, 2013, 4:02:52 PM12/29/13
to web...@googlegroups.com
How can I access the admin app in remote (non localhost) server, when hosting via gevent?

Niphlod

unread,
Dec 30, 2013, 3:37:32 AM12/30/13
to web...@googlegroups.com
as you do with the normal one..... either you use ssh forwarding or you enable ssl

Arnon Marcus

unread,
Dec 30, 2013, 7:06:35 AM12/30/13
to web...@googlegroups.com
How do I do that?
I tried the anyserver -h flag, but there was nothing there about it...

Niphlod

unread,
Dec 30, 2013, 7:42:19 AM12/30/13
to web...@googlegroups.com
how do you connect to the admin app when it's served by rocket ? the same way goes for the gevented webserver (or anyserver.py).

ssh forwarding

ssh -L localport:host:hostport user@ssh_server

Arnon Marcus

unread,
Dec 30, 2013, 10:07:45 AM12/30/13
to web...@googlegroups.com
I have no idea what ssh forwarding is, or whatever it is you wrote here-I can look it up.
I am not a linux wiz by any means, nor an operations guy - just learning things as I go as I need them.

I understand that the admin app, by default, requires a secure channel, for ano non localhost usage. That makes sense. The only way I know of to do that, is to serve web2py over ssl on port 443, with an accomanying certificate, then log-in via the https protocol. I thing I managed to configure that with apache once, not sure about rocket...

My use-case requires remote windows-machine access, since the server is a minimalist centos one, so no-browser.

Can anyserver.py be used to serve web2py through ssl when using gevent?

Niphlod

unread,
Dec 30, 2013, 11:21:59 AM12/30/13
to web...@googlegroups.com
nope. anyserver does not provide ssl capable webserver, 'cause most of the engines leave SSL out of the picture (i.e. since usually you'd want them behind a "real" webserver that acts as a proxy, like apache or nginx, SSL is managed there and not by the python engine).

That being said, I think the best way for you to access the "remote centos miminal server" is to download putty and use port forwarding (putty is an ssh client for windows, for which there is extensive documentation throughout all the internet)

If instead you want gevent to serve directly SSL, you're lucky because:
- gevent is one of the few providing an SSL capable webserver
- there's a script in trunk that serves web2py in gevent with SSL https://github.com/web2py/web2py/blob/master/handlers/web2py_on_gevent.py

Arnon Marcus

unread,
Dec 30, 2013, 2:25:34 PM12/30/13
to web...@googlegroups.com
Cool, thanks.
I have been using putty and winSCP pretty extensively for about a year now - but I won't even need that to access the web2py app files, because I managed to get a samba server up and running...

What I meant by 'accessing the admin app', was that when we have a server-error, we can access the ticket using the web-interface, and figure out what's wrong.
Without that, we would have to manually copy-over the ticket (error-file) into a dev windows-based workstation, and use the dev-server running locally - and that becomes tedious pretty fast. It's actually a very common use-case, as most web-server deployments are on minimalist-distributions, and not all feature ssl... I actually would have expexted the prevalance of such a use-case to already be known and accounted for by now...

I am in the process of working-out porting the centos-uwsgi shell script into ansible roles, but that's taking a while, and I'm still not sure I wanna ditch gevent just-yet (at least not altogether)

Anyways, I'll check that trunc-script, thanks.

Niphlod

unread,
Dec 30, 2013, 3:14:22 PM12/30/13
to web...@googlegroups.com
if you're using putty then why don't you use port forwarding ? that's definitely the easier (and secure) way to go.

summary: using putty, go to connections--ssh--tunnels, put 8000 (or whatever port gevent is listening to) into source port, put localhost:8000 into destination and voilà..... if you use http://localhost:8000 in your pc's browser (the one running putty) the 8000 port is actually the one on the server, so you're able to read tickets and so on.

Arnon Marcus

unread,
Dec 30, 2013, 3:18:38 PM12/30/13
to web...@googlegroups.com
That sounds totally cool!
Didn't know this can be done...


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/4gBGPxJdGHY/unsubscribe.
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.

Reply all
Reply to author
Forward
0 new messages