Hi, <br><br>I have nothing for (gif|png...)<br>I have just tried your suggestion: &quot;location ^~ /media/ &quot; but isn&#39;t still working.<br><br>Thank for your quick reply. From your last question (yes, I only see one .html file) I have discovered something weird. I have added more files to the directory, even more .html files and I can&#39;t see none of them so I guess it must a problem about user:group permissions or cache (I have no &quot;expires&quot; option at the config file) or whatever else.<br>
<br>I have created most of the files not directly on the server but in a nfs mount on an ubuntu client (it&#39;s a intranet), although now I have created some directly on the host but don&#39;t work either.<br>I have restarted both nginx and apache to be sure.<br>
Well I&#39;ll keep investigating as I&#39;m relatively new to linux and will post the solution once I find it.<br><br>I&#39;m excited for having discovered nginx and for your helpful assistance.<br>I welcome any other suggestion to try although it seems not to be an nginx issue.<br>
<br>Thank you and greetings from Barcelona.<br><br>Carlos.<br><br><br><div class="gmail_quote">2009/3/27 Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Fri, Mar 27, 2009 at 09:01:57AM +0000, equalium wrote:<br>
<br>
&gt; Hello, I&#39;m setting up nginx to serve a django site. The django part goes OK but<br>
&gt; I have a problem with my media directory. I&#39;m using this:<br>
&gt;<br>
&gt; location /media/ {<br>
&gt; š šroot š /home/django/domains/myapp/static/;<br>
&gt; }<br>
&gt;<br>
&gt; ...<br>
&gt;<br>
&gt; The problem is that I can access that directory and any html file directly<br>
&gt; inside but not other directories or images.<br>
<br>
</div>Probably, you have also something like this:<br>
<br>
 š šlocation ~ \.(gif|png|jpg|css|js)$ {<br>
<br>
You may delete it if it is not needed, or may disable regex tests for /media/:<br>
<br>
 š šlocation ^~ /media/ {<br>
<div class="im"><br>
&gt; For example, my directories are like this:<br>
&gt;<br>
&gt; ./domains<br>
&gt; ...myapp<br>
&gt; ......static<br>
&gt; .........CSS<br>
&gt; .........images<br>
&gt; .........js<br>
&gt; .........hello.html<br>
&gt; .........image.png<br>
&gt;<br>
&gt; I have the option &quot;autoindex on;&quot;, so when I access: <a href="http://mydomain/media/" target="_blank">http://mydomain/media/</a> I see:<br>
&gt;<br>
&gt; Index of /media/<br>
&gt; ../<br>
&gt; hello.html<br>
&gt;<br>
&gt; Does anybody know what can be wrong?<br>
<br>
</div>Do you see in the listing just index.html without image.png, etc. ?<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br>