Hello everyone, I thought someone might be interested in this: For educational and testing purposes, I wanted to run the code examples from webpy.org (wiki, blog, ...) from a subdirectory (/test/web-py/) of my server (example.com), on which the main content is also served from a web.py app.
After some fruitless trial-and-error, I searched around found a post on serverfault.com[1] which handled a similar issue, and used that solution for my purpose. Here is the specific snippet of my apache2 configuration: <VirtualHost *:80> ServerAdmin [email protected] ServerName example.com DocumentRoot /var/www/example.com # Aliases (most deeply nested URL should come first): Alias /test/web-py/blog /var/www/example.com/test/web-py/blog/index.py/ Alias /test/web-py/wiki /var/www/example.com/test/web-py/wiki/index.py/ Alias /test /var/www/example.com/test Alias / /var/www/example.com/index.py/ AddType text/html .py <Directory /var/www/example.com/> WSGIApplicationGroup %{GLOBAL} AddHandler wsgi-script .py Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride None Order allow,deny allow from all </Directory> <Directory /var/www/example.com/test/> Options Indexes FollowSymLinks MultiViews ExecCGI AuthType Basic AuthName 'Restricter' AuthUserFile /etc/apache2/.htpasswd Require valid-user AllowOverride None Order allow,deny allow from 11.22.33.44 </Directory> <Directory /var/www/example.com/test/web-py/blog/index.py/> WSGIApplicationGroup %{GLOBAL} AddHandler wsgi-script .py Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride None Order allow,deny allow from 11.22.33.44 </Directory> <Directory /var/www/example.com/test/web-py/wiki/index.py/> WSGIApplicationGroup %{GLOBAL} AddHandler wsgi-script .py Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride None Order allow,deny allow from 11.22.33.44 </Directory> # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn ErrorLog /var/log/apache2/example.com/error.log CustomLog /var/log/apache2/example.com/access.log combined </VirtualHost> [1] http://serverfault.com/questions/59791/configure-apache-to-handle-a-sub-path-using-wsgi -- Marios Zindilis -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
