Yes there are many, but I will describe here my personal setup, which I believe is what many have or plan to integrate at one point in time, so I'll spare the hair pulling and cursing and will try to give you the rundown clearly and precise:
The Premise
I have three websites in web2py that I would like to run it side by side, in Apache using WSGI, and would like to have each one of them in its own domain (and while we are at it, hide the application name).
As I mentioned in a previous post, I am running a micro instance of Fedora Core on Amazon Elastic Cloud (EC2), thus these instructions will be somewhat tailored for red-hat-ish systems, however, at home, I use Ubuntu, and besides the different locations for the configuration files and so on, the similarities are very close.
# on RH/Fedora, create the below folder if it does not exist
# otherwise you may see errors in your log, i.e.
# (13)Permission denied: mod_wsgi (pid=3422):
# Unable to connect to WSGI daemon process 'web2py' on
# '/etc/httpd/logs/wsgi.3381.0.1.sock' after multiple attempts
WSGISocketPrefix /var/run/wsgi
<VirtualHost 10.246.94.58:80>
ServerName teroknor.techfuel.net
ServerAlias www.techfuel.net www.pyforum.org
ServerAdmin julio@techfuel.net
DocumentRoot /opt/web2py/
RewriteEngine On
# TechFuel.net
RewriteCond %{HTTP_HOST} =www.techfuel.net [NC,OR]
RewriteCond %{HTTP_HOST} =techfuel.net [NC]
RewriteRule /zblog/(.*) /$1 [N]
RewriteCond %{HTTP_HOST} =www.techfuel.net [NC,OR]
RewriteCond %{HTTP_HOST} =techfuel.net [NC]
RewriteRule ^/(.*) /zblog/$1 [PT,L]
# pyForum.org
RewriteCond %{HTTP_HOST} =www.pyforum.org [NC,OR]
RewriteCond %{HTTP_HOST} =pyforum.org [NC]
RewriteRule /pyforum/(.*) /$1 [N]
RewriteCond %{HTTP_HOST} =www.pyforum.org [NC,OR]
RewriteCond %{HTTP_HOST} =pyforum.org [NC]
RewriteRule ^/(.*) /pyforum/$1 [PT,L]
WSGIScriptAlias / /opt/web2py/wsgihandler.py
WSGIDaemonProcess web2py user=apache group=apache home=/opt/web2py/ processes=5 maximum-requests=10000
# static files do not need WSGI
<LocationMatch "^(/[\w_]*/static/.*)">
Order Allow,Deny
Allow from all
</LocationMatch>
# everything else goes to web2py via wsgi
<Location "/">
Order deny,allow
Allow from all
WSGIProcessGroup web2py
</Location>
# Log. Can be disabled
ErrorLog logs/web2py-error_log
CustomLog logs/web2py-access_log combined
</VirtualHost>
Please stay tuned for "Part Two" of this poor man's guide..
