So i have cut down the router to bare minimum, just to check this admin
issue.
I now have:
routers = dict(
BASE = dict(
domains = {
'myapp.com' : 'myapp1',
'test.myapp.com' : 'myapp2',
}
),
)
logging = 'debug'
after tailing the uwsgi_log i get:
in case of https://myapp.com/admin:
Error opening file for reading: Permission denied
and afterwards a few 404.
while https://test.myapp.com/admin:
just a few 404.
If I turn off the domains and just set default app, everything is fine.
Admin is accessible.
W dniu poniedziałek, 10 września 2012 15:15:40 UTC+2 użytkownik Jonathan
Lundell napisał:
>
> On 10 Sep 2012, at 2:17 AM, Marek Mollin <[email protected] <javascript:>>
> wrote:
>
> Apparently,
> I have to domains there is no way for me to access admin.
> I get gateway timeouts.
>
>
> I'll take a look at the code later today.
>
>
> W dniu poniedziałek, 10 września 2012 01:27:02 UTC+2 użytkownik Marek
> Mollin napisał:
>>
>> So if I skip the admin.app.com line domain I will get:
>> test.app.com/admin
>> app.com/admin
>>
>> all working fine?
>>
>> W dniu niedziela, 9 września 2012 22:01:12 UTC+2 użytkownik Jonathan
>> Lundell napisał:
>>>
>>> On 9 Sep 2012, at 12:42 PM, Marek Mollin <[email protected]> wrote:
>>>
>>> Hello,
>>> I ran into small problem.
>>> I have web2py 2.08 running nginx + postgres.
>>>
>>> I configured routes using parametric system.
>>> In routes.py I defined domains and assigned admin to seperate domain.
>>> By domain i mean actually subdomains...
>>>
>>> test.app.com -> testing environment using seperate db
>>> app.com -> official thing
>>> admin.app.com -> admin for both apps and any other that may comeby....
>>>
>>> Problem is:
>>> Now I cannot access appadmin. (I have no uwsgi_log... just gateway timed
>>> out and have to restart server).
>>>
>>>
>>> There's a problem with having admin in a different domain from an
>>> associated app, in that the URLs that cross the domains aren't specified as
>>> absolute URLs (that is, they don't have a domain attached to them).
>>>
>>> It might be possible to fix that in the parametric router, but noticing
>>> a) that the app specified in a URL() call is different from the calling
>>> app, and b) that the app in question is associated with a domain and/or
>>> port. But at present I don't think it'll work.
>>>
>>> I'm not entirely certain of all this without reviewing the code. Another
>>> workaround would be to treat the domain as a hint, but allow the URL to
>>> override it by explicitly specifying the app. And maybe that happens, but
>>> there's a more subtle issue...
>>>
>>> Turning on router logging might help explain what's going on.
>>>
>>>
>>> My routes.py
>>>
>>> routers = dict(
>>> BASE = dict(
>>> domains = {
>>> 'myapp.com' : 'myapp',
>>> 'admin.myapp.com' : 'admin',
>>> 'test.myapp.com' : 'testm',
>>>
>>>
>>> },
>>> default_application = 'myapp',
>>> applications = ['myapp','admin','testm'],
>>> controllers = 'DEFAULT',
>>> map_static = True
>>> ),
>>> myapp = dict(
>>> functions = dict(
>>> produkty = ['index'],
>>> rozmiary = ['index'],
>>> polityka = ['index'],
>>> ),
>>> ),
>>> )
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>>
>>>
>>>
>>>
> --
>
>
>
>
>
>
>
--