> set $name "";
> if ($http_host ~* ^(www.)?([a-z0-9-]+)\.streamzone\.([a-z]+)) {
> set $name "subdomains/$2/httpdocs";
> }
> if ($http_host ~* ^(www.)?streamzone\.([a-z]+)) {
> set $name "httpdocs";
> }
>
> include /var/www/vhosts/
streamzone.org/conf/nginx-rewrite.conf;
>
> location ~* (announce|scrape)\.php$ {
> access_log off;
> return 404;
> }
>
> location ~ \.php$ {
> include /etc/nginx/nginx-php-cgi.conf;
> fastcgi_param SCRIPT_FILENAME /var/www/vhosts/
>
streamzone.org/$name$fastcgi_script_name;
> }
>
> location ~ userbar\.php/(.*)\.png$ {
> include /etc/nginx/nginx-php-cgi.conf;
> fastcgi_param SCRIPT_FILENAME /var/www/vhosts/
>
streamzone.org/$name/tracker/userbar.php;
> }
>
>
> # Static files location
> location ~*
> ^.+\.(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)$
> {
> root /var/www/vhosts/
streamzone.org/$name;
> expires 10d;
> access_log off;
> }
> }
>
> В конфиге нгинкса идут инклуды в таком порядке
> include /var/www/vhosts/
streamzone.org/conf/nginx-cgi.conf;
> include /var/www/vhosts/
happymommies.ru/conf/nginx-cgi.conf;
>
> И наконец запись лога
> [error] 31318#0: *2371 directory index of "/var/www/vhosts/
>
happymommies.ru//"
> is forbidden, client: 95.169.186.124, server:
happymommies.ru, request:
> "GET /
> HTTP/1.1", host: "
streamzone.org"
>
> Так же запись из access лога сайта
happymommies.ru
> [23/Apr/2010:07:30:26 +0200] 95.169.186.124 404 "GET /tracker/ HTTP/1.1" 169
> "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.12)
> Gecko/2009070611 (.NET CLR 3.5.30729)"
> [23/Apr/2010:07:30:48 +0200] 95.169.186.124 403 "GET / HTTP/1.1" 169 "-"
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.12) Gecko/2009070611
> (.NET CLR 3.5.30729)"