53 lines
1,019 B
Text
53 lines
1,019 B
Text
server {
|
|
access_log /var/log/nginx/files.zzls.xyz.log combined;
|
|
server_name files.zzls.xyz files.nadeko.net;
|
|
include configs/general.conf;
|
|
include configs/security.conf;
|
|
|
|
location / {
|
|
if ($http_user_agent ~* (google) ) {
|
|
return 404;
|
|
}
|
|
|
|
root /mnt/blockstorage/files.zzls.xyz;
|
|
index index.html index.php /_h5ai/public/index.php;
|
|
|
|
location ~ [^/]\.php(/|$) {
|
|
if (!-f $document_root$fastcgi_script_name) {
|
|
return 404;
|
|
}
|
|
fastcgi_pass php-fpm;
|
|
fastcgi_index index.php;
|
|
include fastcgi.conf;
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
fastcgi_param HTTP_PROXY "";
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
location /_h5ai/private {
|
|
return 403;
|
|
}
|
|
|
|
}
|
|
|
|
# QUIC
|
|
include configs/http3.conf;
|
|
|
|
listen 443 ssl;
|
|
http2 on;
|
|
}
|
|
server {
|
|
set $x "";
|
|
if ($host = files.zzls.xyz) {
|
|
set $x 1;
|
|
}
|
|
if ($host = files.nadeko.net) {
|
|
set $x 1;
|
|
}
|
|
if ($x = 1) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
listen 80;
|
|
server_name files.zzls.xyz files.nadeko.net;
|
|
return 404;
|
|
}
|