server { listen 80; server_name _; root /var/www/html; index index.php; client_max_body_size 20m; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "same-origin" always; location / { try_files $uri /index.php$is_args$args; } location ~ \.php$ { fastcgi_pass qrforge-app:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } # Generated qr codes are stored outside the document root and are only served # through the authenticated qrcode_image.php / qrcode_zip_download.php endpoints. location ~ /\. { deny all; } }