etc-configs/nginx/sites-enabled/debug-4get.zzls.xyz.conf

107 lines
2.4 KiB
Plaintext

# FUCK BOTS
limit_req_zone $binary_remote_addr zone=debug-4get:10m rate=1r/s;
# CLEARNET
server {
access_log /var/log/nginx/debug-4get.access.log;
error_log /var/log/nginx/debug-4get.error.log;
server_name debug-4get.zzls.xyz;
root /var/www/4get;
include configs/general.conf;
include configs/robotsNone.conf;
include configs/security.conf;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location / {
try_files $uri @upstream;
}
location /web {
try_files $uri @upstream;
limit_req zone=debug-4get nodelay;
limit_req_status 429;
if ($server_protocol ~* "HTTP/1.1") {
return 444;
}
include snippets/torblacklist.conf;
include snippets/spys.me.proxies.blacklist.conf;
error_page 403 =302 /torisblocked;
error_page 429 =302 /rl;
}
location /torisblocked {
add_header Content-Type text/plain;
return 200 "
Tor and Proxies are not allowed in this service, sorry.
Check if this service offers a Tor version instead, if yes, use it, if not, well, there is no way to use this service.
Tor y Proxies no estan permitidos en este servicio, lo siento.
Revisa si este servicio ofrece una version para Tor, si es asi, usalo, si no, pues no hay forma de usar este servicio.";
}
location /rl {
add_header Content-Type text/plain;
return 200 "Rate Limited, don't spam searches to prevent errors";
}
location /data {
return 444;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
# Tor Header
add_header Onion-Location http://debug-4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
# QUIC
add_header Alt-Svc 'h3=":443";ma=86400';
listen 443 ssl;
listen 443 quic;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name debug-4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
root /var/www/4get;
location @upstream {
try_files $uri.php $uri/index.php =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_intercept_errors on;
}
location / {
try_files $uri @upstream;
}
location ~* ^(.*)\.php$ {
return 301 $1;
}
}
server {
if ($host = debug-4get.zzls.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name debug-4get.zzls.xyz;
}