Hi and thanks for your answer, I already considered adding a prefix to the urls as an option, however I thought a more convenient way might exist.
Probably anyone should add a corresponding hint in the installation instructions? best regards, Stefan On 25 Jun., 18:59, Anand Chitipothu <[email protected]> wrote: > 2010/6/25 Stefan <[email protected]>: > > > > > > > Hi, > > > I'm developing some kind of reservation-system with web.py and used > > the builtin webserver for development. As the project is nearly > > finished, it should be deployed on an Apache webserver (2.x) with > > mod_wsgi on CentOS 5.x. However, I'm running into problems concerning > > the (absolute) paths/URLs in my templates. > > > I followed the instructions mentioned > > inhttp://webpy.org/cookbook/mod_wsgi-apache > > and I'm able to access the basic portal containing a login-form on > >http://localhost/applications/myapp. > > > I face the same problem on every site, I'll describe it for the > > mentioned login-site: The form-action of the site is set to '/login' > > in the template login.html, now when trying to submit the form I get a > > not-found-error as Apache tries to accesshttp://localhost/login > > instead ofhttp://localhost/application/myapp/login. > > > So what am I missing? Do I need to set something like a 'base path' > > for the application in web.py? (I'd like to have such an option, of > > course! :)) Any chances deploying the application in a VirtualHost > > where DocumentRoot is set to where code.py is situated will work? > > That can be solved using $homepath()/login in the urls and adding the > following function to template globals. > > def homepath(): > return web.ctx.homepath > > Anand -- 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.
