- Fix Docker: add php.ini, correct env var names (DB_NAME/DB_USER/DB_PASS), add 002_email_log.sql to initdb, add Authorization header passthrough, add uploads volume, install opcache, create .dockerignore - UI polish: page fade-in transitions, skeleton loader CSS, staggered card animations, mobile sidebar backdrop overlay, keyboard focus-visible styles, button loading state, tooltip system, alert banners, tab component, custom scrollbar, print styles, clickable table rows - Add setButtonLoading() and _toggleSidebar() helpers to common.js - Update CLAUDE.md to reflect 100% project completion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
66 lines
2.9 KiB
Nginx Configuration File
66 lines
2.9 KiB
Nginx Configuration File
server {
|
|
listen 8080;
|
|
server_name _;
|
|
|
|
root /var/www/nis2-agile/public;
|
|
index index.php index.html;
|
|
|
|
charset utf-8;
|
|
|
|
# ── Security Headers ───────────────────────────────────────────────────
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
# ── Logging ────────────────────────────────────────────────────────────
|
|
access_log /var/log/nginx/nis2-access.log;
|
|
error_log /var/log/nginx/nis2-error.log;
|
|
|
|
# ── Max Upload Size ────────────────────────────────────────────────────
|
|
client_max_body_size 20M;
|
|
|
|
# ── Main Location ──────────────────────────────────────────────────────
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
# ── PHP-FPM Processing ─────────────────────────────────────────────────
|
|
location ~ \.php$ {
|
|
fastcgi_pass app:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
|
|
# Pass Authorization header (required for JWT auth)
|
|
fastcgi_param HTTP_AUTHORIZATION $http_authorization;
|
|
|
|
fastcgi_param HTTP_PROXY "";
|
|
fastcgi_buffer_size 128k;
|
|
fastcgi_buffers 4 256k;
|
|
fastcgi_busy_buffers_size 256k;
|
|
fastcgi_read_timeout 300;
|
|
}
|
|
|
|
# ── Static Assets Caching ──────────────────────────────────────────────
|
|
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
access_log off;
|
|
}
|
|
|
|
# ── Deny Hidden Files ──────────────────────────────────────────────────
|
|
location ~ /\. {
|
|
deny all;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
# ── Deny access to sensitive files ─────────────────────────────────────
|
|
location ~* \.(env|sql|md|json|lock|yml|yaml)$ {
|
|
deny all;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
}
|