php-файлы попадают не в location /var/www/dir2, а в location ~ \.php$.<br><br><div class="gmail_quote">11 февраля 2009 г. 16:55 пользователь aris aris <span dir="ltr">&lt;<a href="mailto:aris66@yandex.ru">aris66@yandex.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;">Нужно закрыть доступ по www к папке dir2 (не в корне сайта dir1). Пробовал такой конфиг, не работает. Т.е. папка по www открывается.<br>

<br>
server {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;listen &nbsp; &nbsp; &nbsp; 80;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;server_name &nbsp;<a href="http://server.ru" target="_blank">server.ru</a> <a href="http://www.server.ru" target="_blank">www.server.ru</a>;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;location /var/www/dir2 {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;deny all;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; }<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;location / {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; /var/www/dir1;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;index index.html index.php;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;location ~ \.php$ {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass &nbsp; <a href="http://127.0.0.1:1026" target="_blank">127.0.0.1:1026</a>;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_index &nbsp;index.php;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param &nbsp;SCRIPT_FILENAME &nbsp;/var/www/dir1$fastcgi_script_name;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;include &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_params;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<font color="#888888">--<br>
Спасибо<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>С уважением, Борис Долгов.<br>icq 77556665<br>e-mail <a href="mailto:boris@dolgov.name">boris@dolgov.name</a><br>