Perhaps this can help? http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
Anyway you can mimic it with web2py. In a model add: if not session.authorized: if request.post_vars.password == '123456': session.authorized = True else: raise HTTP(200,HTML(BODY(FORM('Password:',INPUT(_name='password'),INPUT(_type='submit')))).xml()) On Sunday, 17 February 2013 13:22:20 UTC-6, Chr_M wrote: > > I understand it is a primitive system, but also a quick way to put a > website behind a login. I do not want to integrate an authentication > system, because it is only for some betatesters before the website goes > live. > > On Sunday, February 17, 2013 4:25:16 PM UTC+1, Massimo Di Pierro wrote: >> >> Why do you want to use htaccess instead of web2py own authentication. >> htaccess is such a primitive system. >> >> >> On Sunday, 17 February 2013 06:26:09 UTC-6, Chr_M wrote: >>> >>> I come from a PHP background and when I wanted to have a website (or a >>> part) behind a login screen (for example for beta testing) I could do that >>> with a htaccess and htpasswd file (with Apache2). I have deployed a web2py >>> website with Apache2, but I can not figure out how to have this website >>> behind an Apache2 login. Is that possible with a web2py with Apache2 setup >>> with a htaccess file? Or is there an alternative way to do in with web2py? >>> >>> Thanks in advance. >>> >>> Regards, Chris >>> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.