51 lines
1,003 B
Text
51 lines
1,003 B
Text
server {
|
|
access_log /var/log/nginx/files.zzls.xyz.log combined;
|
|
|
|
server_name files.zzls.xyz;
|
|
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(/|$) {
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
if (!-f $document_root$fastcgi_script_name) {
|
|
return 404;
|
|
}
|
|
|
|
fastcgi_param HTTP_PROXY "";
|
|
|
|
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
location /_h5ai/private {
|
|
return 403;
|
|
}
|
|
|
|
}
|
|
|
|
listen 443 ssl;
|
|
http2 on;
|
|
include configs/ssl.conf;
|
|
|
|
}
|
|
server {
|
|
if ($host = files.zzls.xyz) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
listen 80;
|
|
server_name files.zzls.xyz;
|
|
return 404; # managed by Certbot
|
|
}
|