If you want to deploy a web2py app as an alias in Apache Webserver, you need configure your
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName www.domain.com
ServerAlias domain.com *.domain.com
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/myapp.* [NC]
RewriteRule ^/(.*) /myapp/$1 [PT,L]
WSGIScriptAlias /myapp /opt/web2py/wsgihandler.py
</VirtualHost>
It’s common that a bad configuration raise the exception: RuntimeError: Using a recursive select but encountered a broken reference: auth_group 1 when you try to login. Although it work properly with the built-in webserver (./python web2py.py …)
As defined in their official page of web2py it’s a:
Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python.

