updates for debian

This commit is contained in:
David Bomba
2024-11-22 13:48:50 +11:00
parent b65257db66
commit 1f778c0945
9 changed files with 168 additions and 56 deletions

View File

@@ -1,12 +1,18 @@
server {
listen 80;
server_name localhost;
error_log /var/log/nginx/error.log debug;
access_log /var/log/nginx/access.log;
listen 80 default_server;
server_name _;
server_tokens off;
client_max_body_size 100M;
root /var/www/html/public;
index index.php;
charset utf-8;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
@@ -14,21 +20,19 @@ server {
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~* /storage/.*\.php$ {
return 503;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.(?!well-known).* {
deny all;
}
# Enable browser caching for static assets
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}
}
}