I'm not certain that it's a problem, but your Alias directives have an extra 
space in the filesystem names, which could result in many things not being 
found...
         Alias /funambulus/chrome/common /var/wiki/funambulus_trac/www/ 
htdocs/common
------------------------------------------------------------------------^
Regards,DickMS 
      From: RjOllos <[email protected]>
 To: Trac Users <[email protected]> 
 Sent: Saturday, February 13, 2016 10:43 AM
 Subject: [Trac] Re: Missing header and footer when running with WSGI
   


On Saturday, February 13, 2016 at 9:08:49 AM UTC-8, Vijay Varadan wrote:
I did a fresh install of trac in the following environment:
Ubuntu 14.04.3python 2.7.,6PostgreSQL 9.3.11psycopg2 2.6.1Genshi 0.7-3Babel 
1.3setuptools 3.3
Everything works fine when I use tracd as follows (user and group are set to be 
the same as Apache):
tracd --port 8000 -r --group=www-data --user=www-data /var/wiki/funambulus_trac

I proceeded to using the trac wiki with Apache 2.4.7  WSGI configured as 
follows:
         Alias /funambulus/chrome/common /var/wiki/funambulus_trac/www/ 
htdocs/common
         Alias /funambulus/chrome/site /var/wiki/funambulus_trac/www/ 
htdocs/site
         <Directory "/var/wiki/funambulus_trac/ www/htdocs">
                 # For Apache 2.4
                 <IfModule mod_authz_core.c>
                         Require all granted
                 </IfModule>
         </Directory>


         WSGIScriptAlias /funambulus /var/wiki/funambulus_trac/www/ 
cgi-bin/trac.wsgi
         <Directory /var/wiki/funambulus_trac/www/ cgi-bin>
                 Options -Indexes -MultiViews -SymLinksIfOwnerMatch
                 AllowOverride All
                 WSGIApplicationGroup %{GLOBAL}
                 # For Apache 2.4
                 <IfModule mod_authz_core.c>
                         Require all granted
                 </IfModule>
         </Directory>



And the trac.wsgi file is the standard one created via trac-admin ... deploy
import os


def application(environ, start_request):
    if not 'trac.env_parent_dir' in environ:
        environ.setdefault('trac.env_ path', '/var/wiki/funambulus_trac')
    if 'PYTHON_EGG_CACHE' in environ:
        os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
    elif 'trac.env_path' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac. env_path'], '.egg-cache')
    elif 'trac.env_parent_dir' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac. env_parent_dir'], '.egg-cache')
    from trac.web.main import dispatch_request
    return dispatch_request(environ, start_request)



When I access trac through WSGI, the header and footer are missing everywhere. 
The site seems to work fine otherwise.

I've added TRAC_ADMIN temporarily to anonymous role to help with debugging, in 
case someone wants to take a look.
Does anyone have pointers as to where to start looking to resolve this? I've 
not done much web development with Python / WSGI, but since everything seems to 
be working fine without WSGI - I could use some pointers.
Thanks,Vijay Varadan


I'm unsure what the issue it, but I can reproduce by putting a file name 
theme.html in $env/templates, with the following content:
<!DOCTYPE html    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";><html 
xmlns="http://www.w3.org/1999/xhtml"      
xmlns:xi="http://www.w3.org/2001/XInclude"      
xmlns:py="http://genshi.edgewall.org/"      
xmlns:i18n="http://genshi.edgewall.org/i18n"      py:strip="">
</html>
Continuing to investigate ...
- Ryan -- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


   

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to