FYI - If you name your default app as init, you do not need the welcome rewrite rule...
By default, web2py looks for existence of an app called init; if it is not found, it looks for "welcome". Init does not show up as part of the URL, so for example if you browse from welcome to examples, you see myweb2py.wherever.net/welcome/examples/default/index but if you copy welcome to init, and then start web2py, and browse to examples, your browser url will show: myweb2py.wherever.net/examples/default/index (no "init" in the url) On Wed, Jul 8, 2009 at 3:03 PM, Jonathan Lundell <[email protected]> wrote: > > This deployment recipe requires Apache with mod_proxy and mod_rewrite. > It runs the welcome (or some other) web2py application with the admin > interface disabled (no password). > > 1. Install a shell script with execute permissions as ~/bin/w2p.sh: > > ======== > #!/bin/sh > HTDOCS=/usr/www/users/username > W2PDIR=web2py > nohup python $HTDOCS/$W2PDIR/web2py.py -a '<recycle>' -i 127.0.0.1 -p > 8666 & > ======== > > where HTDOCS is the path to your web root and HTDOCS/W2PDIR is your > web2py installation directory. The port is arbitrary, but must be >= > 1024. > > 2. In $HTDOCS/.htaccess include the following: > > ======== > RewriteEngine on > RewriteBase /usr/www/users/username > RewriteRule ^(welcome(/.*)?)$ http://127.0.0.1:8666/$1 [P] > ======== > > Change 'welcome' to another application as required. [P] means proxy. > The IP address (localhost) and port must match those in the shell > script in step (1). > > 3. Start web2py manually by logging in and running w2p.sh. In > addition, if you have access to a user crontab, you can add this entry > to restart web2py after a reboot: > > ======== > @reboot $HOME/bin/w2p.sh > ======== > > > > Before you bother, though, make sure that your ISP permits long- > running unattended processes, as mine (pair.com) does not. :-( > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

