39 lines
822 B
Plaintext
39 lines
822 B
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root %root%;
|
|
index index.php index.html index.htm;
|
|
|
|
location = /favicon.ico {
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
if ($is_webp) {
|
|
set $img_sufix ".webp";
|
|
}
|
|
|
|
location /thb/ {
|
|
try_files $uri$img_sufix /resize.php?$uri$img_sufix;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
}
|
|
|