<div dir="ltr">Спасибо, Roxis.<br><br>Теперь заработало.<br><br>Может лучше исправить в документации?<br><a href="http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#alias">http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#alias</a><br>
<br><div class="gmail_quote">2008/9/20 Roxis <span dir="ltr">&lt;<a href="mailto:roxis@list.ru">roxis@list.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><div></div><div class="Wj3C7c">On Saturday 20 September 2008, Rauan Maemirov wrote:<br>
&gt; nginx версии 0.7.13<br>
&gt;<br>
&gt; location /userpics/ {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; alias /var/user/userpics/;<br>
&gt; }<br>
&gt;<br>
&gt; права на папку 777 и один и тот же юзер.<br>
&gt;<br>
&gt; там картинка лежит (имя файла &quot;нормальное&quot;. jpg). но выдает 404.<br>
&gt;<br>
&gt; Чуть ниже еще один location.<br>
&gt;<br>
&gt;<br>
&gt; location ~ &quot;\.(js|ico|gif|jpg|mp3|png|txt|css|swf)$&quot; {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; expires 30d;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; root /home/project/html;<br>
&gt; }<br>
&gt;<br>
&gt; debug log<br>
&gt;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http uri: &quot;/userpics/quessir.jpg&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http args: &quot;&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http exten: &quot;jpg&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http process request header line<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Host: <a href="http://mysite.kz" target="_blank">mysite.kz</a>&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;User-Agent:<br>
&gt; Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:<a href="http://1.9.0.1" target="_blank">1.9.0.1</a>)<br>
&gt; Gecko/2008070208 Firefox/3.0.1&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Accept:<br>
&gt; text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Accept-Language:<br>
&gt; en-us,en;q=0.5&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Accept-Encoding:<br>
&gt; gzip,deflate&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Accept-Charset:<br>
&gt; ISO-8859-1,utf-8;q=0.7,*;q=0.7&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Keep-Alive: 300&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Connection:<br>
&gt; keep-alive&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header: &quot;Cookie:<br>
&gt; PHPSESSID=vtqape9137kn0bjs630o1vqhq6&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 http header done<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 event timer del: 16: 942721589<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 generic phase: 0<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 test location: &quot;/&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 test location: &quot;services/upload/&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 test location: &quot;userpics/&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 test location: ~ &quot;\.php$&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 test location: ~<br>
&gt; &quot;\.(js|ico|gif|jpg|mp3|png|txt|css|swf)$&quot;<br>
&gt; 2008/09/06 21:02:53 [debug] 32336#0: *1 using configuration<br>
&gt; &quot;\.(js|ico|gif|jpg|mp3|png|txt|css|swf)$&quot;<br>
&gt;<br>
&gt;<br>
&gt; Как видите перескакивает.<br>
<br>
</div></div>это ожидаемое поведение, читайте<br>
<a href="http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#location" target="_blank">http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#location</a><br>
<br>
вам нужно:<br>
<div class="Ih2E3d"><br>
location ^~ /userpics/ {<br>
&nbsp;alias /var/user/userpics/;<br>
}<br>
<br>
</div>или лучше:<br>
<br>
location ^~ /userpics/ {<br>
 &nbsp;root /var/user;<br>
}<br>
<br>
</blockquote></div><br></div>