routes.py problems

239 views
Skip to first unread message

BlueShadow

unread,
May 23, 2016, 12:20:41 PM5/23/16
to web...@googlegroups.com
I reinstalled pretty much everything on my Server new OS newest web2py ... and got my application back and running :-) but web2py uses still the default routes.py.
when I copied my old routes.py to the web2py root I got an internal server error. I thought well lets use the example file copied it to root and renamed it to routes.py same thing. when I remove the routes.py it woks (welcome app at domain and app at domain/app)

any suggestions or help is very welcome :)

Jim S

unread,
May 23, 2016, 12:29:45 PM5/23/16
to web2py-users
Can you post the routes.py that is not working?

-Jim

BlueShadow

unread,
May 23, 2016, 12:33:13 PM5/23/16
to web...@googlegroups.com
#!/usr/bin/python
# -*- coding: utf-8 -*-


routers
= dict(
  BASE  
= dict(
      domains
= {
         
'domain.com' : 'App',
         
'www.domain.com' : 'App',
         
'111.111.111.111/test' : 'test',

     
}
 
),
 
App = dict(
  root_static
=['BingSiteAuth.xml','googlea0df30fe6baf4df4.html','f8d6b8.html','favicon.ico','Favicon.ico', 'robots.txt','humans.txt']
 
)
)


routes_onerror
= [
   
('App/*', '/App/default/error_site')
   
]

logging
= 'warning'


but the  routes.parametric.example.py from the newest web2py distribution doesn't work either
they both cause a white site which sais internal server error.

when there is no routes.py in the web2py folder it works.
if there is one it does not. which routes.py is used by web2py if there is none in the folder?

Jim Steil

unread,
May 23, 2016, 12:45:27 PM5/23/16
to web...@googlegroups.com
And, what is the error?

On Mon, May 23, 2016 at 11:33 AM, BlueShadow <kevin....@gmail.com> wrote:
#!/usr/bin/python
# -*- coding: utf-8 -*-


routers
= dict(
  BASE  
= dict(
      domains
= {
         
'domain.com' : 'App',
         
'www.domain.com' : 'App',
         
'111.111.111.111/test' : 'test',

     
}
 
),
 
App = dict(
  root_static
=['BingSiteAuth.xml','googlea0df30fe6baf4df4.html','f8d6b8.html','favicon.ico','Favicon.ico', 'robots.txt','humans.txt']
 
)
)


routes_onerror
= [
   
('App/*', '/App/default/error_site')
   
]

logging
= 'warning'

On Monday, May 23, 2016 at 6:20:41 PM UTC+2, BlueShadow wrote:
I reinstalled pretty much everything on my Server new OS newest web2py ... and got my application back and running :-) but web2py uses still the default routes.py.
when I copied my old routes.py to the web2py root I got an internal server error. I thought well lets use the example file copied it to root and renamed it to routes.py same thing. when I remove the routes.py it woks (welcome app at domain and app at domain/app)

any suggestions or help is very welcome :)

--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/PDw01ZLpUqY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Bethke

unread,
May 23, 2016, 12:47:08 PM5/23/16
to web...@googlegroups.com
like I said an internal server error so I guess the error is before web2py? so nginx? but it doesn't make any sense to me. the file worked for years. and the example file should work too.

On Mon, May 23, 2016 at 6:45 PM, Jim Steil:
And, what is the error?
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/PDw01ZLpUqY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.

Jim Steil

unread,
May 23, 2016, 12:52:19 PM5/23/16
to web...@googlegroups.com
What webserver, and what URL are you accessing?

Jim Steil

unread,
May 23, 2016, 12:52:31 PM5/23/16
to web...@googlegroups.com
What OS?

Kevin Bethke

unread,
May 23, 2016, 12:54:31 PM5/23/16
to web...@googlegroups.com

Os: ubuntu 16.04. Webserver: Nginx


Jim S

unread,
May 23, 2016, 1:08:57 PM5/23/16
to web2py-users
Have you looked at /var/log/nginx/error.log?

-Jim

On Monday, May 23, 2016 at 11:54:31 AM UTC-5, BlueShadow wrote:

Os: ubuntu 16.04. Webserver: Nginx url: www.movie-alarm.de

BlueShadow

unread,
May 23, 2016, 5:47:09 PM5/23/16
to web...@googlegroups.com

It seems to work now my routes.py had no default application. I still need to figure out how to route the other sites but new day new luck. thanks Jim
But on that note shouldn't there be a ticket somewhere faulty out of date routes.py?
because the internal server error didn't help a bit.
nginx error logs didn't give any info either.
Reply all
Reply to author
Forward
0 new messages