etc-configs/nginx/conf.d/4get.zzls.xyz.conf

101 lines
1.8 KiB
Plaintext

limit_req_zone $binary_remote_addr zone=4get:10m rate=4r/s;
# CLEARNET
server {
access_log /var/log/nginx/4get.access.log limited;
error_log /var/log/nginx/4get.error.log;
server_name 4get.zzls.xyz 4get.nadeko.net;
root /var/www/4get-zzls;
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 ~* ^(.*)\.php$ {
return 301 $1;
}
location / {
try_files $uri @upstream;
}
location /web {
try_files $uri @upstream;
if ($server_protocol ~* "HTTP/1.1") {
return 444;
}
include snippets/torblacklist.conf;
error_page 403 =302 /torisblocked;
error_page 429 =302 /rl;
}
location /torisblocked {
alias errors/$request_uri.txt;
}
location /rl {
alias errors/$request_uri.txt;
}
location /data {
return 444;
}
# Tor Header
add_header Onion-Location http://4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion$request_uri;
# QUIC
include configs/http3.conf;
listen 443 ssl;
http2 on;
include configs/ssl.conf;
}
# TOR
server {
listen 80;
server_name 4get.zzlsghu6mvvwyy75mvga6gaf4znbp3erk5xwfzedb4gg6qqh2j6rlvid.onion;
root /var/www/4get-zzls/;
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 {
set $x "";
if ($host = 4get.zzls.xyz) {
set $x 1;
}
if ($host = 4get.nadeko.net) {
set $x 1;
}
if ($x = 1) {
return 301 https://$host$request_uri;
}
listen 80;
server_name 4get.zzls.xyz 4get.nadeko.net;
}