On Aug 4, 8:04 pm, Graham Dumpleton <[email protected]> wrote: > On Aug 4, 6:41 pm, Zhang Huangbin <[email protected]> wrote: > > > On Aug 4, 3:30 pm, Graham Dumpleton <[email protected]> > > wrote: > > > > and copy from it into the web.py documentation anything relevant to > > > your current web.py version you may want to preserve and provide me a > > > link to where in web.py documentation mod_wsgi integration is > > > described. > > > These two: > > - mod_wsgi deployment through > > Apache:http://webpy.org/cookbook/mod_wsgi-apache > > - mod_wsgi deployment through Nginx:http://webpy.org/cookbook/mod_wsgi-nginx > > I only look after Apache/mod_wsgi. > > On the Apache page you have: > > WSGIScriptAlias /appname /var/www/webpy-app/code.py/ > > That should really be: > > WSGIScriptAlias /appname /var/www/webpy-app/code.py > > That is, no trailing slash on right hand size. > > If the trailing slash is needed by web.py, then web.py isn't handling > trailing slash redirection properly for application root URL. > > Also: > > Alias /appname/static /var/www/webpy-app/static/ > > You would normally use either: > > Alias /appname/static /var/www/webpy-app/static > > or: > > Alias /appname/static/ /var/www/webpy-app/static/ > > That is, either trailing slash on both, or no trailing slash on > either.
Also, isn't: app = web.application(urls, globals()) curdir = os.path.dirname(__file__) session = web.session.Session(app, web.session.DiskStore(curdir + '/' + 'sessions'),) application = app.wsgifunc() quite dangerous. You have effectively said to put session database in same directory as the WSGI script file. For how some people might setup mod_wsgi, that would mean the session database would be downloadable by a remote user. I would suggest therefore you give an example that stores the session database in a location which is not in a directory for which Apache has been configured as being allowed to serve files from. Graham --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
