&gt;&gt;<a href="http://nginx.org/en/docs/http/converting_rewrite_rules.html" target="_blank">http://nginx.org/en/docs/http/converting_rewrite_rules.html</a><br>  , .       :)<br><br>
&gt;&gt; ,  /etc/hosts     <br>,      .        ,        .<br><br>   .<br>
<br><div class="gmail_quote">23  2010 . 10:05  Igor Sysoev <span dir="ltr">&lt;<a href="mailto:igor@sysoev.ru">igor@sysoev.ru</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;">
<div><div></div><div class="h5">On Fri, Apr 23, 2010 at 09:35:07AM +0400, Naf Nafof wrote:<br>
<br>
&gt; ,  ,  .   -     <br>
&gt; .<br>
&gt;  ,      :)<br>
&gt; ,   :<br>
&gt;<br>
&gt;  3proxy:<br>
&gt;<br>
&gt; nscache 65536<br>
&gt; timeouts 1 5 30 60 180 1800 15 60<br>
&gt; users ***:CL:***<br>
&gt; daemon<br>
&gt; auth strong<br>
&gt; allow ***<br>
&gt; external 0.0.0.0<br>
&gt; internal 95.169.186.124<br>
&gt; deny * * 127.0.0.1,192.168.1.1<br>
&gt; allow * * * 80-88,8080-8088 HTTP<br>
&gt; allow * * * 443,8443 HTTPS<br>
&gt; proxy -n -a<br>
&gt;<br>
&gt;<br>
&gt;  ,    <br>
&gt;<br>
&gt; server {<br>
&gt;     listen <a href="http://95.169.187.124:80" target="_blank">95.169.187.124:80</a>;<br>
&gt;<br>
&gt;     server_name <a href="http://streamzone.ru" target="_blank">streamzone.ru</a> <a href="http://www.streamzone.ru" target="_blank">www.streamzone.ru</a> <a href="http://streamzone.org" target="_blank">streamzone.org</a><br>

&gt; <a href="http://www.streamzone.org" target="_blank">www.streamzone.org</a>;<br>
&gt;<br>
&gt;     access_log<br>
&gt; /var/www/vhosts/<a href="http://streamzone.org/statistics/logs/access_logmain" target="_blank">streamzone.org/statistics/logs/access_logmain</a>;<br>
&gt;     error_log /var/www/vhosts/<a href="http://streamzone.org/statistics/logs/error_log" target="_blank">streamzone.org/statistics/logs/error_log</a>;<br>
&gt; #    access_log off;<br>
&gt;<br>
&gt;     root /var/www/vhosts/<a href="http://streamzone.org/$name" target="_blank">streamzone.org/$name</a>;<br>
&gt;     index index.php;<br>
&gt;<br>
&gt;     if ( $http_host = &#39;<a href="http://streamzone.ru" target="_blank">streamzone.ru</a>&#39; ) {<br>
&gt;       rewrite ^(.*)$ <a href="http://streamzone.org" target="_blank">http://streamzone.org</a>$1 permanent;<br>
&gt;     }<br>
<br>
</div></div><a href="http://nginx.org/en/docs/http/converting_rewrite_rules.html" target="_blank">http://nginx.org/en/docs/http/converting_rewrite_rules.html</a><br>
<div><div></div><div class="h5"><br>
&gt;     set $name &quot;&quot;;<br>
&gt;     if ($http_host ~* ^(www.)?([a-z0-9-]+)\.streamzone\.([a-z]+)) {<br>
&gt;       set $name &quot;subdomains/$2/httpdocs&quot;;<br>
&gt;     }<br>
&gt;     if ($http_host ~* ^(www.)?streamzone\.([a-z]+)) {<br>
&gt;       set $name &quot;httpdocs&quot;;<br>
&gt;     }<br>
&gt;<br>
&gt;     include /var/www/vhosts/<a href="http://streamzone.org/conf/nginx-rewrite.conf" target="_blank">streamzone.org/conf/nginx-rewrite.conf</a>;<br>
&gt;<br>
&gt;     location ~* (announce|scrape)\.php$ {<br>
&gt;       access_log off;<br>
&gt;       return 404;<br>
&gt;     }<br>
&gt;<br>
&gt;     location ~ \.php$ {<br>
&gt;       include /etc/nginx/nginx-php-cgi.conf;<br>
&gt;       fastcgi_param SCRIPT_FILENAME /var/www/vhosts/<br>
&gt; <a href="http://streamzone.org/$name$fastcgi_script_name" target="_blank">streamzone.org/$name$fastcgi_script_name</a>;<br>
&gt;     }<br>
&gt;<br>
&gt;     location ~ userbar\.php/(.*)\.png$ {<br>
&gt;       include /etc/nginx/nginx-php-cgi.conf;<br>
&gt;       fastcgi_param SCRIPT_FILENAME /var/www/vhosts/<br>
&gt; <a href="http://streamzone.org/$name/tracker/userbar.php" target="_blank">streamzone.org/$name/tracker/userbar.php</a>;<br>
&gt;     }<br>
&gt;<br>
&gt;<br>
&gt;     # Static files location<br>
&gt;     location ~*<br>
&gt; ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js|7z|htm|html)$<br>
&gt; {<br>
&gt;       root /var/www/vhosts/<a href="http://streamzone.org/$name" target="_blank">streamzone.org/$name</a>;<br>
&gt;       expires 10d;<br>
&gt;       access_log off;<br>
&gt;     }<br>
&gt; }<br>
&gt;<br>
&gt;        <br>
&gt;   include /var/www/vhosts/<a href="http://streamzone.org/conf/nginx-cgi.conf" target="_blank">streamzone.org/conf/nginx-cgi.conf</a>;<br>
&gt;   include /var/www/vhosts/<a href="http://happymommies.ru/conf/nginx-cgi.conf" target="_blank">happymommies.ru/conf/nginx-cgi.conf</a>;<br>
&gt;<br>
&gt;    <br>
&gt; [error] 31318#0: *2371 directory index of &quot;/var/www/vhosts/<br>
&gt; <a href="http://happymommies.ru//" target="_blank">happymommies.ru//</a>&quot;<br>
&gt; is forbidden, client: 95.169.186.124, server: <a href="http://happymommies.ru" target="_blank">happymommies.ru</a>, request:<br>
&gt; &quot;GET /<br>
&gt; HTTP/1.1&quot;, host: &quot;<a href="http://streamzone.org" target="_blank">streamzone.org</a>&quot;<br>
&gt;<br>
&gt;     access   <a href="http://happymommies.ru" target="_blank">happymommies.ru</a><br>
&gt; [23/Apr/2010:07:30:26 +0200] 95.169.186.124 404 &quot;GET /tracker/ HTTP/1.1&quot; 169<br>
&gt; &quot;-&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.12)<br>
&gt; Gecko/2009070611 (.NET CLR 3.5.30729)&quot;<br>
&gt; [23/Apr/2010:07:30:48 +0200] 95.169.186.124 403 &quot;GET / HTTP/1.1&quot; 169 &quot;-&quot;<br>
&gt; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.12) Gecko/2009070611<br>
&gt; (.NET CLR 3.5.30729)&quot;<br>
<br>
</div></div> ,  /etc/hosts     <br>
<br>
95.169.186.124  <a href="http://streamzone.org" target="_blank">streamzone.org</a><br>
<div class="im"><br>
<br>
--<br>
 <br>
<a href="http://sysoev.ru" target="_blank">http://sysoev.ru</a><br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://nginx.org/mailman/listinfo/nginx-ru</a><br>
</div></div></blockquote></div><br>