Hi found a solution:
Look this trac.sandbox.conf apache file:

Alias /trac/chrome/common /var/tracprojects/sandbox/deploy/htdocs/common
Alias /trac/chrome/site /var/tracprojects/sandbox/deploy/htdocs
<Directory "/var/tracprojects/sandbox/deploy/htdocs">
  Order allow,deny
  Allow from all
</Directory>

*AliasMatch ^/(.+)/chrome/common(.*)
/var/tracprojects/sandbox/deploy/htdocs/common$2
AliasMatch ^/(.+)/chrome/site(.*)
/var/tracprojects/sandbox/deploy/htdocs/site$2
*
WSGIScriptAlias /sandbox /var/tracprojects/sandbox/deploy/cgi-bin/trac.wsgi

<Directory /var/tracprojects/sandbox/deploy/cgi-bin>
     WSGIApplicationGroup %{GLOBAL}
     Order deny,allow
     Allow from all
</Directory>

<Location "/trac/login">
     AuthType Basic
     AuthName "Trac"
     AuthUserFile /var/tracprojects/.htpasswd
     Require valid-user
</Location>

this AliasMatch offer the ability to use static ressources correctly.

2010/10/24 Xarkam Ubuntu <[email protected]>

> Hi, y make a deploy of static ressources on my Trac.
>
> This is my tree for statics ressources:
> /home/trac/OSAMES/deploy/htdocs
>
> There is my apache configuration file:
>
> #<IfModule mod_rewrite.c>
>> #RewriteEngine On
>> #RewriteLog "/var/log/apache2/rewrite.log"
>> #RewriteLogLevel 9
>>
>> # Don't let DirectoryIndex mess with Trac installed in the root
>> #RewriteCond %{REQUEST_URI} ^/$
>> #RewriteRule . /osames [QSA,PT,L]
>>
>> # Don't let Trac handle existing directories, files or aliases
>> #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
>> #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
>> #RewriteCond %{REQUEST_URI} !^/(awstats|cgi-bin/)
>> # prepend /osames to URI and append Query String, Pass-Through to xxxAlias
>> directives, Last rule.
>> #RewriteRule ^(.*)$ /osames$1 [QSA,PT,L]
>> #</IfModule>
>>
>> #Alias /trac/chrome/common /usr/lib/python2.6/dist-packages/trac/htdocs/
>> #<Directory "/usr/lib/python2.6/dist-packages/trac/htdocs/">
>> #  Order allow,deny
>> #  Allow from all
>> #</Directory>
>>
>> Alias /trac/chrome/common /home/trac/OSAMES/deploy/htdocs/common
>
> *Alias /trac/chrome/site /home/trac/OSAMES/deploy/htdocs/site*
>> *<Directory "/home/trac/OSAMES/deploy/htdocs/site">*
>>   Order allow,deny
>>   Allow from all<IfModule mod_expires.c>
>>   <FilesMatch "\.(jpg|gif|png|pdf|css|js)$">
>>     ExpiresActive On
>>     ExpiresDefault "access plus 1 month"
>>   </FilesMatch>
>> </IfModule>
>>
>> <IfModule mod_deflate.c>
>>   AddOutputFilterByType DEFLATE text/html text/css text/js
>> application/x-javascript text/plain text/xml
>> </IfModule>
>>
>> WSGIScriptAlias /osames   /home/trac/OSAMES/deploy/cgi-bin/trac.wsgi
>> ## This is required if you plan to use HTTP authorization. Without it the
>> ## user name won't be passed
>> # WSGIPassAuthorization On
>>
>> <Directory /home/trac/OSAMES/deploy/cgi-bin>
>>     WSGIApplicationGroup %{GLOBAL}
>>     Order deny,allow
>>     Allow from all
>> </Directory>
>>
>> <Location /osames/login>
>> AuthName "Trac"
>> AuthType Basic
>> AuthUserFile /home/trac/OSAMES/.htpasswd
>> require valid-user
>> </location>
>>
>> </Directory>
>>
>
> My problem is in the site/ definition. the files in this directory is not
> found by Trac.
> Ex.: <img src="/osames/chrome/site/osames_2_white.png" /> on home page not
> found the logo in /home/trac/OSAMES/deploy/htdocs/site
>
> Where is my error ?
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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/trac-users?hl=en.

Reply via email to