Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
rewrite ^/script$ /dir/file.php last;
server { }
server { listen 80; listen [::]:80; server_name _; error_page 500 501 502 504 505 506 507 508 509 510 511 @err; error_page 503 @throttle; root /var/www/tracker; location / { #root /var/www/tracker; index index.php; } location /ann { rewrite ^/ann$ /tracker/announce.php last; } location @err { return 500 "server error. please try again later."; default_type text/plain; } location @throttle { return 503 "we've detected abuse on your ip. please wait and try again later."; default_type text/plain; } location ~ \.php$ { include snippets/fastcgi-php.conf; # # # With php-fpm (or other unix sockets): fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # # With php-cgi (or other tcp sockets): # fastcgi_pass 127.0.0.1:9000; #fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/tracker$fastcgi_script_name; } }
error_page 500 501 502 504 505 506 507 508 509 510 511 @err;
return 500 "server error. please try again later.";