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
-~----------~----~----~----~------~----~------~--~---

Reply via email to