librelist archives

« back to archive

strange root_path on production with mod_wsgi

strange root_path on production with mod_wsgi

2013-04-21 @ 22:39
Hello friends!

I experience strange root_path in apache2/mod_wsgi with the following 
(standard, i believe) config

         DocumentRoot /home/pony/htdocs/may/www
         <Directory /home/pony/htdocs/may/www>
                 Options FollowSymLinks
                 AllowOverride None

         <IfModule mod_wsgi.c>
                 WSGIDaemonProcess may 
                 WSGIScriptAlias / /home/pony/htdocs/may/flask2/

                 <Directory /home/pony/htdocs/may/flask2>
                         WSGIProcessGroup may
                         WSGIApplicationGroup %{GLOBAL}
                         Order deny,allow
                         Allow from all

The error i get is "TemplateNotFound" (while it is there). While 
debugging i found out that "app.root_path" is not 
"/home/pony/htdocs/may/flask2", as it should be, but "/home/pony" instead.
For now i have dirty-hacked it to 
app.root_path='/home/pony/htdocs/may/flask2' in, but i'd rather 
prefer having it working normally.