Trac logo problem

I have installed trac (v 0.11.7) in the debian box. Everything works fine except that I couldn't display the logo. I used mod-wsgi and deployed the project to a folder called "deploy". Inside the deployment folder, I have an htdocs folder that has two subfolders, common and site. I changed [header_logo] trac.ini so that it reads

src=site/logo.jpg
width=200
height=100

      

It will not be displayed until the .jpg logo is saved in the site folder. When I changed src to common / trac_logo_mini.png it showed up. Then I moved my logo.jpg to the common subfolder and changed src to common / logo.jpg. Still no.

In my browser if I used

https://192.168.1.10/myproject/chrome/common/trac_logo_mini.png

      

the browser would display the picture. When I copied trac_logo_mini.png to mylogo.png and used

https://192.168.1.10/myproject/chrome/common/mylogo.png

      

the browser does not render mylogo.png.

I wonder why.

Here are my settings. I did trac-admin myproject/env deploy myproject/deploy

. The logo is in the folder myproject/deploy/site

.

In the default ssl file I have

WSGIScriptAlias /myproject /trac_pool/myproject/deploy/cgi-bin/trac.wsgi
<Directory /trac_pool/myproject/deploy>
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

<Location "/myproject">
    AuthType Basic
    AuthName "My Project Trac"
    AuthUserFile /trac_pool/myproject/trac.htpasswd
    Require valid-user
</Location>'

      

+3


source to share


4 answers


This is how my server is configured, it might help solve your problem.

trac.ini:

[header_logo]
src = site/mylogo.gif

      



File system:

/srv/trac$ ls -1F
  attachments/
  conf/
  db/
  deploy/
  htdocs/
  log/
  plugins/
  README
  templates/
  VERSION
/srv/trac$ ls -1F htdocs/
  mylogo.gif
  index.html@
  print.css
  site_custom.js
  style.css

      

Essentially, using the 'site /' prefix in trac.ini maps to the 'htdocs' folder in the Trac folder hierarchy.

+4


source


I also had problems with my trac logo. It turned out that the file permissions were such that the www user data could not read the logo file. Fixed that after chmod +r <logofile>

and the problem was gone.



+2


source


Have you tried setting the src of your logo to src = / logo.jpg only?

When I look in the Admin section for trac I can see that I have a logo for root set and when I look at my trac installation I have a logo located at the root of htdocs.

enter image description here

0


source


Great answer. Place your logo in the htdocs folder and customize the logo section of the trac.ini header as shown below. the site is redirected to the htdocs folder and mylogo.gif is the image.

[header_logo]

src = site / mylogo.gif

0


source







All Articles