Yes I do it all the time. Here is the config I use on Ubuntu in
/etc/apache2/conf.d
#### START OF FILE
# most people use /home/www-data I just happend to use /home/web2py instead
this time
# I put this file in /etc/apache2/conf.d/, This makes it global to the
apache install.
# the key here is the /w you need to have a routes.py that corresponds with
the directory name
#
# Put the 2 lines below in a routes.py in /home/web2py/web2py directory and
restart apache2
#
# routes_in=(('/w/(?P<a>.*)','/\g<a>'),)
# routes_out=(('/(?P<a>.*)','/w/\g<a>'),)
WSGIDaemonProcess web2py user=www-data group=www-data
WSGIProcessGroup web2py
WSGIScriptAlias /w /home/web2py/web2py/wsgihandler.py
WSGIPassAuthorization On
AliasMatch ^/w/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
/home/web2py/web2py/applications/$1/static/$2
<Directory /home/web2py/web2py/applications/*/static/>
Options -Indexes
Order Allow,Deny
Allow from all
</Directory>
# can allow certain addresses to access admin
<Location /w/admin>
Deny from all
Allow from 162.202.204.106
</Location>
<LocationMatch ^/w/([^/]+)/appadmin>
Deny from all
Allow from 162.202.204.106
</LocationMatch>
CustomLog /var/log/apache2/access.log common
ErrorLog /var/log/apache2/error.log
### END OF FILE
On Wednesday, June 4, 2014 1:33:33 AM UTC-7, Erik Easie Flo wrote:
>
> Aloha is there a solution that allows you to run the web2py in a sub
> directory? I've looked through the books blogs and can't find a straight
> forward solution with either routes.py or in apache.
>
> Thanks,
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.