[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trac
Subject:    [Trac] Re: Static ressources not found in deploy/htdocs/site/
From:       Xarkam Ubuntu <xarkam.ubuntu.fr () gmail ! com>
Date:       2010-10-25 10:20:38
Message-ID: AANLkTi=jKHVZpy2WUtU_jDSm+Zx6Cyhjg+3iYPRqHYhw () mail ! gmail ! com
[Download RAW message or body]

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 <xarkam.ubuntu.fr@gmail.com>

> 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 trac-users@googlegroups.com.
To unsubscribe from this group, send email to trac-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


[Attachment #3 (text/html)]

Hi found a solution:<br>Look this trac.sandbox.conf apache file:<br><br>Alias \
/trac/chrome/common /var/tracprojects/sandbox/deploy/htdocs/common<br>Alias \
/trac/chrome/site /var/tracprojects/sandbox/deploy/htdocs<br>&lt;Directory \
&quot;/var/tracprojects/sandbox/deploy/htdocs&quot;&gt;<br>  Order allow,deny<br>  \
Allow from all<br>&lt;/Directory&gt;<br><br><b>AliasMatch ^/(.+)/chrome/common(.*) \
/var/tracprojects/sandbox/deploy/htdocs/common$2<br>AliasMatch ^/(.+)/chrome/site(.*) \
/var/tracprojects/sandbox/deploy/htdocs/site$2<br> </b><br>WSGIScriptAlias /sandbox \
/var/tracprojects/sandbox/deploy/cgi-bin/trac.wsgi<br><br>&lt;Directory \
/var/tracprojects/sandbox/deploy/cgi-bin&gt;<br>     WSGIApplicationGroup \
%{GLOBAL}<br>     Order deny,allow<br>     Allow from all<br> \
&lt;/Directory&gt;<br><br>&lt;Location &quot;/trac/login&quot;&gt;<br>     AuthType \
Basic<br>     AuthName &quot;Trac&quot;<br>     AuthUserFile \
/var/tracprojects/.htpasswd<br>     Require valid-user<br>&lt;/Location&gt;<br> \
<br>this AliasMatch offer the ability to use static ressources correctly.<br><br><div \
class="gmail_quote">2010/10/24 Xarkam Ubuntu <span dir="ltr">&lt;<a \
href="http://xarkam.ubuntu.fr">xarkam.ubuntu.fr</a>@<a \
href="http://gmail.com">gmail.com</a>&gt;</span><br> <blockquote class="gmail_quote" \
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); \
padding-left: 1ex;">Hi, y make a deploy of static ressources on my Trac.<br><br>This \
                is my tree for statics ressources:<br>
/home/trac/OSAMES/deploy/htdocs<br><br>There is my apache configuration \
file:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid \
rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"> #&lt;IfModule \
mod_rewrite.c&gt;<br>#RewriteEngine On<br>#RewriteLog \
&quot;/var/log/apache2/rewrite.log&quot;<br>#RewriteLogLevel 9<br><br># Don&#39;t let \
DirectoryIndex mess with Trac installed in the root<br>#RewriteCond %{REQUEST_URI} \
^/$<br>

#RewriteRule . /osames [QSA,PT,L]<br><br># Don&#39;t let Trac handle existing \
directories, files or aliases<br>#RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} \
!-d<br>#RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f<br>

#RewriteCond %{REQUEST_URI} !^/(awstats|cgi-bin/)<br># prepend /osames to URI and \
append Query String, Pass-Through to xxxAlias directives, Last rule.<br>#RewriteRule \
^(.*)$ /osames$1 [QSA,PT,L]<br>#&lt;/IfModule&gt;<br> <br>
#Alias /trac/chrome/common \
/usr/lib/python2.6/dist-packages/trac/htdocs/<br>#&lt;Directory \
&quot;/usr/lib/python2.6/dist-packages/trac/htdocs/&quot;&gt;<br>#  Order \
allow,deny<br>#  Allow from all<br>#&lt;/Directory&gt;<br>

<br>Alias /trac/chrome/common /home/trac/OSAMES/deploy/htdocs/common \
</blockquote><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid \
rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><b>Alias \
/trac/chrome/site /home/trac/OSAMES/deploy/htdocs/site</b><br>

<b>&lt;Directory &quot;/home/trac/OSAMES/deploy/htdocs/site&quot;&gt;</b><br>  Order \
allow,deny<br>  Allow from all&lt;IfModule mod_expires.c&gt;<br>  &lt;FilesMatch \
&quot;\.(jpg|gif|png|pdf|css|js)$&quot;&gt;<br>    ExpiresActive On<br>

    ExpiresDefault &quot;access plus 1 month&quot;<br>  \
&lt;/FilesMatch&gt;<br>&lt;/IfModule&gt;<br><br>&lt;IfModule mod_deflate.c&gt;<br>  \
AddOutputFilterByType DEFLATE text/html text/css text/js application/x-javascript \
text/plain text/xml<br>

&lt;/IfModule&gt;<br><br>WSGIScriptAlias /osames   \
/home/trac/OSAMES/deploy/cgi-bin/trac.wsgi<br>## This is required if you plan to use \
HTTP authorization. Without it the<br>## user name won&#39;t be passed<br># \
WSGIPassAuthorization On<br>

<br>&lt;Directory /home/trac/OSAMES/deploy/cgi-bin&gt;<br>    WSGIApplicationGroup \
%{GLOBAL}<br>    Order deny,allow<br>    Allow from \
all<br>&lt;/Directory&gt;<br><br>&lt;Location /osames/login&gt;<br>AuthName \
&quot;Trac&quot;<br>

AuthType Basic<br>AuthUserFile /home/trac/OSAMES/.htpasswd<br>require \
valid-user<br>&lt;/location&gt;<br><br>&lt;/Directory&gt;<br></blockquote><br>My \
problem is in the site/ definition. the files in this directory is not found by \
Trac.<br>

Ex.: &lt;img src=&quot;/osames/chrome/site/osames_2_white.png&quot; /&gt;<span \
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: &#39;Times New \
Roman&#39;; font-style: normal; font-variant: normal; font-weight: normal; \
letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; font-size: medium;"><span style="font-family: \
monospace; white-space: pre-wrap;"></span></span> on home page not found the logo in \
/home/trac/OSAMES/deploy/htdocs/site<br>

<br>Where is my error ?<br>
</blockquote></div><br>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "Trac \
Users" group.<br /> To post to this group, send email to \
trac-users@googlegroups.com.<br /> To unsubscribe from this group, send email to \
trac-users+unsubscribe@googlegroups.com.<br />

For more options, visit this group at \
http://groups.google.com/group/trac-users?hl=en.<br />



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic