new package: nginx addon

This commit is contained in:
2022-12-19 10:58:24 +01:00
parent 373019d876
commit 1899c15932
10 changed files with 594 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
server {
listen 8080;
listen [::]:8080;
server_name "";
root /assets/data;
index index.php index.html index.htm index.default.php;
rewrite ^/content/(.*)\.(txt|md|mdown)$ /index.php last;
rewrite ^/site/(.*) /index.php last;
rewrite ^/kirby/(.*) /index.php last;
access_log /assets/logs/access.log;
error_log /assets/logs/error.log;
client_max_body_size 250M;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~* \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php8.1-fpm-tooloop.sock;
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PHP_VALUE "upload_max_filesize=250M;\n error_reporting=E_ALL;";
}
location ~ /\.ht {
deny all;
}
# location ~* \.(?:jpg|jpeg|gif|png|webp|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|js|css|json|otf|ttf)$ {
# etag on;
# expires 1M;
# if_modified_since exact;
# add_header Pragma "public";
# add_header Cache-Control "public, max-age=31536000,no-transform";
# }
}