Just wanted to post the configuration page that is working in my
production server, I've installed web2py and my "new" app in it,
written 100% in python/web2py (my blog), here are the settings:
Webserver: Apache 2.0.63
System: CentOS 4.5
Access Level: Full (root)
# Apache Configuration file for handling the web2py framework
# as a proxy: web2py_vhosts.conf, in RedHat-ish systems, copy this
configuration
# file to /etc/httpd/conf/* or wherever you have you httpd.conf file
and
# add an entry in the httpd.conf file to "Include" this file
<VirtualHost your.ip.address:80>
ServerName
yourwebsite.com
ServerAlias
www.yourwebsite.com
# All request will end up here, you may have more apps which will
be defined
# on each <Location> (and <LocationMatch>) sections
Alias / /enter/your/web2py/locaton/here/web2py/applications/
# Static files are served as standard filesystem files
<LocationMatch "ˆ/zblog/static/.*">
Order Allow,Deny
Allow from all
</LocationMatch>
<Location "/zblog/">
Order deny,allow
Allow from all
ProxyPass
http://localhost:8000/zblog/
ProxyPassReverse
http://localhost:8000/
</Location>
<Location "/">
Order deny,allow
Allow from all
ProxyPass
http://localhost:8000/zblog/
ProxyPassReverse
http://localhost:8000/
</Location>
ErrorLog logs/yourwebsite-web2py-error_log
CustomLog logs/yourwebsite-web2py-access_log combined
</VirtualHost>
A couple of changes from the original documentation (and the book):
The "Alias" directive must end with a "/" (Apache2 is a bit picky on
this, this also applies for the <Location /> directives).
In my particular case, my app is called "zblog", thus, with that
information you'll go to
http://www.yourwebsite.com/zblog/ and you'll
get there, but you want the "root" of the website (i.e.
http://www.yourwebsite.com/)
to point to your app, that is what the last <location /> section is
for, read the apache docs in case of doubt, even the order in which
each <location /> is specified matters.
Well, my $0.02 for now, I just hope this helps other individuals, take
care and g'nite.