I have Windows Server and Apache 2.2 and many apps:

 applications/app1
 applications/app2
 applications/app3

in Apache config:
Include conf/includes/*.conf

############################################################  localhost:80 
 #######################################
<VirtualHost localhost:80>
# кто-то стучится черз локал хост на назные админи-урл! могут и на мой 
залезтьтак
#ServerName localhost
#ServerAlias localhost
DocumentRoot "C:/localhost"
<Directory "C:/localhost">
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Location "/mySQLadmin">
Order deny,allow
Allow from all
</Location>

LogFormat "%h %l %u %t \"%r\" %>s %b" common
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>


in /includes I have web2py.conf:
<VirtualHost *:80>
  #ServerName lite.cash - not need
  #ServerAlias www.lite.cash - not need

    DocumentRoot  C:/web2py-m

#  <Directory C:/web2py-m>
#    Require all denied
#    <Files wsgihandler.py>
#      Require all granted
#    </Files>
#  </Directory>
#
#  <Directory c:/web2py-m/applications/*/static/>
#    Require all granted
#  </Directory>
#
#  <Location /admin>
#    Require all denied
#  </Location>
#
#  <LocationMatch ^/([^/]+)/appadmin>
#    Require all denied
#  </LocationMatch>
#################################################
<Directory "C:/web2py-m">
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Location "/">
Order deny,allow
Allow from all
</Location>

<LocationMatch "^(/[\w_]*/static/.*)">
Order Allow,Deny
Allow from all
</LocationMatch>

WSGIScriptAlias  / "C:/web2py-m/wsgihandler.py"

LogFormat "%h %l %u %t \"%r\" %>s %b" common
ErrorLog "logs/lite.log"
CustomLog "logs/lite-access.log" common


</VirtualHost>

then in web2py root I have routes.py:
routes_app = [
# app3
    (r'.*?:https?://my_dom3.com/path3:\w* /$anything', r'app3'),
    (r'.*?:https?://www.my_dom3.com/path3:\w* /$anything', r'app3'),
# app2
    (r'.*?:https?://my_domain2:\w* /$anything', r'app2'),
    (r'.*?:https?://www.my_domain2:\w* /$anything', r'app2'),
# admin
    (r'(.+)admin/$anything', r'admin'),
# local
    (r'(.+)8000/(?P<any>.*)', r'\g<any>'),
# defaults
    ]



in each app folder I have routes.py
for example here two apps - bets as app4 and bs3b as app3
routes_in = (
(r'/bets/$anything', r'/bets/$anything'),
(r'/bets', r'/bets'),
(r'/', r'/bs3b/default/index/'),
(r'/index/$anything', r'/bs3b/default/index/$anything'),
(r'/index', r'/bs3b/default/index'),
#(r'/download', r'/bs3b/default/download'),
(r'/join/$anything', r'/bs3b/default/index/join/$anything'),
(r'/join', r'/bs3b/default/index/join'),
(r'/shop_add/$anything', r'/bs3b/default/shop_add/$anything'),
(r'/shop_add', r'/bs3b/default/shop_add'),
(r'/support/$anything', r'/bs3b/default/support/$anything'),
(r'/support', r'/bs3b/default/support'),
(r'/$anything', r'/bs3b/$anything'),
)

routes_out = [(x, y) for (y, x) in routes_in]



-- 
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.

Reply via email to