location ^~ /bt/ {
access_log off;
if ( $query_string ~ "^at=([^&?]{10})[&?]+(.*)$" ) {
set $at $1;
set $qs $2&ip=$remote_addr;
}
if ( $query_string ~ "^at=([^&?]{10})[&?]+((.*&|)ip=.*)$" ) {
set $at $1;
set $qs $2;
}
if ( $qs ) {
rewrite ^.*/([a-z]+)(\.php|)$ /$at/$1?$qs break;
}
rewrite ^.*/([a-z]+)(\.php|)$ /$1 break;
proxy_pass http://127.0.0.1:2710;
}
location ~ ^/[^/]+/(an|announce)$ {
rewrite ^/http://127.0.0.1:2710/announce permanent;
}
// Tracker
$bb_cfg['announce_type'] = 'xbt'; // Тип анонсера, xbt или php
$bb_cfg['announce_xbt'] = "http://{$bb_cfg['server_name']}:27**";
$bb_cfg['announce_xbt'] .'/'. $passkey .'/announce';
Если оставить все как есть, Это вот этот код в nginxSrelok,зачем прописывать?
location ^~ /bt/ {
access_log off;
if ( $query_string ~ "^at=([^&?]{10})[&?]+(.*)$" ) {
set $at $1;
set $qs $2&ip=$remote_addr;
}
if ( $query_string ~ "^at=([^&?]{10})[&?]+((.*&|)ip=.*)$" ) {
set $at $1;
set $qs $2;
}
if ( $qs ) {
rewrite ^.*/([a-z]+)(\.php|)$ /$at/$1?$qs break;
}
rewrite ^.*/([a-z]+)(\.php|)$ /$1 break;
proxy_pass http://127.0.0.1:2710;
}
// Tracker
$bb_cfg['announce_type'] = 'php'; // Тип анонсера, xbt или php
$bb_cfg['announce_xbt'] = "http://{$bb_cfg['server_name']}:2710";
Не чего по счёт хобота в конфигах nginx у меня нет и всё работает
не там копаете
у нас
PHP:// Tracker $bb_cfg['announce_type'] = 'xbt'; // Тип анонсера, xbt или php $bb_cfg['announce_xbt'] = "http://{$bb_cfg['server_name']}:2710";
а такого нет !
PHP:$bb_cfg['announce_xbt'] .'/'. $passkey .'/announce';
# TT21_new ==============================================================================
server {
listen 80;
server_name rutracker21.org www.rutracker21.org;
charset utf-8;
access_log off;
error_log off;
#error_page 403 http://dragonstar.ru/error/403.html;
error_page 404 http://rutracker21.org/error/404/404.php;
#error_page 502 503 504 http://dragonstar.ru/error/server-error.html;
# Main location
location / {
root C:/***/***/***;
index index.php;
client_max_body_size 200M;
client_body_buffer_size 16k;
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#Блокировка хакеров и прочих мудаков ))))))))))
deny 95.81.246.129;
}
# Static files location
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root C:/***/***/***;
limit_rate_after 1m;
# 800 kb/s i neh
set $limit_rate 800k;
}
}
# TT21_new конец ======================================================================