diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..f5a13b8 --- /dev/null +++ b/default.conf @@ -0,0 +1,38 @@ +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; + } +} +