Ops, right, I should have seen it!
I'm sorry but it doesn't solve... I'm still receiving "invalid
application".
I will go trying...

On 20 Mag, 22:28, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Sorry. My bad
>
> routes_in=(('/w2p/(?P<a>.*)','/$a'),)
> routes_out=(('/(?P<a>.*)','/w2p/$a'),)
>
> On May 20, 3:24 pm, giohappy <gioha...@gmail.com> wrote:
>
> > Hi Massimo. I'm a newbie with web2py, I didn't know about routes.py :)
> > Anyway, I receive the following on fcgihandler startup:
>
> > m...@c:/var/www/lighttpd/web2py$ WARNING:root:URL rewrite is on.
> > configuration in routes.py
> > Traceback (most recent call last):
> >   File "fcgihandler.fcgi", line 6, in <module>
> >     import gluon.main
> >   File "/var/www/lighttpd/web2py/gluon/main.py", line 404, in <module>
> >     (wsgibase, html.URL) = rewrite(wsgibase, html.URL)
> >   File "/var/www/lighttpd/web2py/gluon/rewrite.py", line 51, in
> > rewrite
> >     routes_in.append((re.compile(k, re.DOTALL), v))
> >   File "/usr/lib/python2.6/re.py", line 190, in compile
> >     return _compile(pattern, flags)
> >   File "/usr/lib/python2.6/re.py", line 245, in _compile
> >     raise error, v # invalid expression
> > sre_constants.error: syntax error
>
> > I can't find the problem in the syntax you propose...
>
> > On 20 Mag, 21:15, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > Do not do this:
> > >                          #"strip-request-uri" => "w2p/"
> > > instead in the web2py folder create a file routes.py that contains
>
> > > routes_in=(('/w2p/(?<a>.*)','/$a'),)
> > > routes_out=(('/(?<a>.*)','/w2p/$a'),)
>
> > > this should solve your problem assuming you build all your inner
> > > references using {{=URL(...)}} or using relative paths. Let me know if
> > > it does not solve it.
>
> > > Massimo
>
> > > On May 20, 1:58 pm, giohappy <gioha...@gmail.com> wrote:
>
> > > > No way, url rewrite doesn't solve it. Maybe it's my ignorance, but it
> > > > seems that the lighttpd fastcgi system override it, or maybe only for
> > > > web2py as we involke the fastcgihandler as a 404-error handler.
> > > > If someone has tips to share, he's very welcome! :)
>
> > > > giovanni
>
> > > > On 20 Mag, 19:30, giohappy <gioha...@gmail.com> wrote:
>
> > > > > Thanks Mark.
> > > > > I've digged the problem with a rudimental debug, and I can see from
> > > > > the response headers that it's an "invalid application" error, as
> > > > > web2py looks for /var/www/lighttpd/web2py/applications/w2p, while the
> > > > > last key should be stripped.
> > > > > Lighttpd comes with a strip-request-uri, but it seems a bit buggy. In
> > > > > my case it completely strips the request uri, and gives strange
> > > > > characters as output, so I recieve obviously an "invalid path" error
> > > > > from web2py.
> > > > > I'll try with rewrite urls, but I thought it coud cause problems to
> > > > > the internal rewrite rules of web2py... but your experience is
> > > > > different. I'll go for it, and let you know.
>
> > > > > giovanni
>
> > > > > PS: web2py developers, could we find a solution for this? Maybe a
> > > > > configuration option? I know web2py is zero-configuration... but this
> > > > > could worth a one-line file! :)
>
> > > > > On 20 Mag, 19:08, Mark Larsen <larsen...@gmail.com> wrote:
>
> > > > > > > but that configuration doesn't fit my needs.
> > > > > > > I've tried setting the following config, but it always results 
> > > > > > > with an
> > > > > > > "Invalid request". I suppose it's due to the uri parsing, but I 
> > > > > > > can't
> > > > > > > solve it as I'm quite new to Lighttpd.
> > > > > > > Any ideas?
>
> > > > > > Giovanni,
>
> > > > > > I had the same problem with web2py, apache2 and mod_wsgi.  Unless 
> > > > > > I'm
> > > > > > missing something huge, much of web2py (the URL function for 
> > > > > > example)
> > > > > > is wired to have your handler at the root of the webserver.  I'm 
> > > > > > still
> > > > > > surprised more web2pyers haven't come up against this limitation.
>
> > > > > > Regardless, I fixed it with apache's mod_rewrite.  I believe 
> > > > > > lighttpd
> > > > > > has similar functionality (I'm not a lighty user).  Perhaps 
> > > > > > something
> > > > > > like -->
>
> > > > > > url.rewrite = (
> > > > > > “^/appName(.*)$” => “/subFolder/appName$1”
> > > > > > )
>
> > > > > > This would redirect the URLs web2py is spitting out to the proper 
> > > > > > lighttpd path.
>
> > > > > > I also wrote about in the Wiki here
> > > > > > (https://mdp.cti.depaul.edu/wiki/default/page/56ec0fa4-0a01-4e5f-b0d5-...)
> > > > > > but it looks like that is eating my mark-up (A bug in the wiki?).
>
> > > > > > Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to