server {
listen 80 default sndbuf=32k rcvbuf=8k;
server_name торрент-домен.ru
charset utf8;
access_log off;
location / {
root /var/www/торрент-домен.ru;
index index.html index.htm index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
# pass the PHP scripts to FastCGI server listening on /tmp/php.sock;
#
location ~ \.php$ {
#limit_req zone=one burst=20 nodelay;
#limit_req_log_level info;
root /var/www/rap-torrent.ru;
fastcgi_index index.php;
fastcgi_pass unix:/tmp/php.sock; # 127.0.0.1:9000;
fastcgi_intercept_errors on;
# FreeBSD Optimization
fastcgi_pass_request_body off;
client_body_in_file_only clean;
fastcgi_param REQUEST_BODY_FILE $request_body_file;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ^~ /bt/ {
access_log off;
rewrite ^/?(.*)$ /$1?ip=$remote_addr&$query_string break;
proxy_pass
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
# deny sql,tpl,db,inc,log
location ~ /\.ht {
deny all;
}
location ~ \.(.*sql|tpl|db|inc|log)$ {
deny all;
}
}