My routes.py with multiple domains.  I don't really see any difference.  
Are you sure you're using the right domains?  I also have entries in there 
for when I'm testing from my local network because the domain is going to 
look different.

#!/usr/bin/python
# -*- coding: utf-8 -*-


# default_application, default_controller, default_function
# are used when the respective element is missing from the
# (possibly rewritten) incoming URL
#
default_application = 'app1'    # ordinarily set in base routes.py
default_controller = 'default'  # ordinarily set in app-specific routes.py
default_function = 'index'      # ordinarily set in app-specific routes.py


routers = dict(BASE=dict(domains={'www.url1.com': 'app1',
                                  'www.url2.com': 'app2',
                                  'localhostname1': 'app1',
                                  'localhostname2': 'app2'}), )


routes_onerror = [
    ('app1/*', '/app1/default/error_handler')
]





On Monday, July 1, 2019 at 8:23:30 AM UTC-5, Áureo Dias Neto wrote:
>
> Good morning group,
>
> I'm using web2py on nginx + gunicorn, I currently have two applications 
> with two different domains, one for each web2py application ..
>
> Each domain points to my ip in AWS and nginx, each domain has a file in 
> nginx with its settings and server_name corresponding to its domain with 
> location pointing to / web2py / applications
>
> My routes.py file follows the pattern:
>
> routers = dict (
>     BASE = dict (
>         domains = {
>             'exampleapp.com': 'exampleapp',
>             'anotherexample.com': 'anotherexample',
>         }
>     ),
> )
>
> however, whenever you access exampleapp.com or any other domain listed 
> there, I'm redirected to exampleapp.com/welcome
>
> I can only run an app with the following configuration in the routes.py 
> file
>
> routers = dict (
>     BASE = dict (
>         default_application = 'exampleapp',
>         domains = {
>             'exampleapp.com': 'exampleapp',
>             'anotherexample.com': 'anotherexample',
>         }
>     ),
> )
>
> so both exampleapp.com and anotherexample.com redirect to exampleapp.
>
> How to proceed?
> Hugs
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/aa588fcc-b4b9-4389-a6a0-519052e31f90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to