This commit is contained in:
zino
2023-11-29 12:02:53 +01:00
parent 3b2d7e8967
commit 29c45475f0
2 changed files with 14 additions and 10 deletions

View File

@@ -1,4 +1,3 @@
# HTTPS Server Block
server {
listen 443 ssl;
listen [::]:443 ssl;

View File

@@ -21,17 +21,22 @@ server {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; img-src 'self' data:; style-src 'self'; font-src 'self' data:;" always;
# PHP Processing (Adjust if using PHP)
# location ~ \.php$ {
# include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/var/run/php/php-version-fpm.sock;
# }
# PHP Processing
location ~ \.php$ {
resolver 127.0.0.11;
set $upstream "php:9000";
include fastcgi_params;
fastcgi_pass $upstream;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
# Static File Caching (Optional)
# location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
# expires 30d;
# add_header Cache-Control "public, immutable";
# }
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}
server {