Files
fotospiel-app/docker/nginx/default.conf
Codex Agent 5ee1baa7e2
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled
Fix forwarded host/port for signed URLs
2026-01-13 22:30:10 +01:00

52 lines
1.6 KiB
Plaintext

server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/html/public;
index index.php index.html;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass app:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
fastcgi_param HTTP_X_FORWARDED_HOST $http_x_forwarded_host;
fastcgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
fastcgi_param HTTP_HOST $host;
fastcgi_param HTTP_X_FORWARDED_PORT $server_port;
fastcgi_param HTTPS $http_x_forwarded_proto;
fastcgi_buffer_size 32k;
fastcgi_buffers 8 16k;
}
location ^~ /internal-docs/ {
# Docusaurus static build lives in app-code volume at /var/www/html/docs/site/build
alias /var/www/html/docs/site/build/;
index index.html;
try_files $uri $uri/ /internal-docs/index.html;
auth_basic "Fotospiel Internal Docs";
auth_basic_user_file /etc/nginx/.htpasswd-docs;
add_header Cache-Control "private, no-store";
}
location ~* \.(jpg|jpeg|gif|png|css|js|ico|svg|webp|woff2?)$ {
expires 30d;
access_log off;
}
client_max_body_size 32m;
}