Hello, Thanks for your hint.... I am a bit confused why do we need a fcgi for static file -- if not all your paths are forwarded to web.py? e.g. I can write a plain old index.html and let apache serve it -- there is no need for php/python, whatever, just a plain web server?
On Nov 1, 9:45 am, Hraban Luyat <[email protected]> wrote: > On Sat, Oct 31, 2009 at 17:44 -0700, xrfang wrote: > > > Hi there, > > > I found a post discussing static file serving. I am also from PHP and > > has the same confusion. I have a thinking, why cannot we use an > > internal variable such as web.static_path (which default to "/ > > static/") to specify which folder is static? This way, we can specify > > more than one static folder such as /styles/, /img/, /downloads/, this > > will be handy. And this static_path variable can be a regex, or a > > list/tuple of string/regex. What do you think? > > > 2ndly, if use webpy with other servers such as apache or the GAE, is > > the /static/ file serving directly hand-over to the web server, or it > > is still streamed by webpy? > > > Thanks > > Hi, > > Just an answer to the second question: that depends on how you configure > your webserver. If you configure it to pass on every request to web.py, > it will do just that: pass every request, including /static/.*, to > web.py. Thus, web.py will serve the static file. If you explicitly > configure it to not have fcgi for /static/.*, it will serve static files > internally. > > To illustrate this, I posted my configuration to the mailing list a > while ago: > > http://groups.google.com/group/webpy/browse_thread/thread/21c659ea62a... > > It also allows you to eliminate the /static/ entirely. But beware: I am > having trouble with the fcgi process dying after a while, and I still > have not got a clue as to why that is. Be careful when copying this > configuration. > > Greetings, > > Hraban --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
