apache - how to let the domin ip point to a web2py app instead of the default "welcome" app -
i want enter app http://my.domain.ip/ instead of http://my.domain.ip/myapp.should change apache config(conf.d/deault.conf) or else? want bind domin names other apps in web2py/applications if domin ip test success.
namevirtualhost *:80 namevirtualhost *:443 <virtualhost *:80> wsgidaemonprocess web2py user=apache group=apache processes=1 threads=1 wsgiprocessgroup web2py wsgiscriptalias / /opt/web-apps/web2py/wsgihandler.py wsgipassauthorization on <directory /opt/web-apps/web2py/applications> allowoverride none order allow,deny deny <files wsgihandler.py> allow </files> </directory>
i tried set <directory /opt/web-apps/web2py/applications>
<directory /opt/web-apps/web2py/applications/app>
,but did't work.
web2py's parameter-based rewrite system allows map domains apps. in routes.py:
routers = dict( base = dict( domains = { 'domain1.com' : 'app1', 'domain2.com' : 'app2', } ), )
the pattern-based rewrite system used well.
Comments
Post a Comment