Hi, <br><br>I have nothing for (gif|png...)<br>I have just tried your suggestion: "location ^~ /media/ " but isn'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't see none of them so I guess it must a problem about user:group permissions or cache (I have no "expires" 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's a intranet), although now I have created some directly on the host but don't work either.<br>I have restarted both nginx and apache to be sure.<br>
Well I'll keep investigating as I'm relatively new to linux and will post the solution once I find it.<br><br>I'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"><<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>></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>
> Hello, I'm setting up nginx to serve a django site. The django part goes OK but<br>
> I have a problem with my media directory. I'm using this:<br>
><br>
> location /media/ {<br>
> š šroot š /home/django/domains/myapp/static/;<br>
> }<br>
><br>
> ...<br>
><br>
> The problem is that I can access that directory and any html file directly<br>
> 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>
> For example, my directories are like this:<br>
><br>
> ./domains<br>
> ...myapp<br>
> ......static<br>
> .........CSS<br>
> .........images<br>
> .........js<br>
> .........hello.html<br>
> .........image.png<br>
><br>
> I have the option "autoindex on;", so when I access: <a href="http://mydomain/media/" target="_blank">http://mydomain/media/</a> I see:<br>
><br>
> Index of /media/<br>
> ../<br>
> hello.html<br>
><br>
> 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>