# Nginx configuration for SmartSolTech (optional, for production with Nginx) upstream django_app { server web:8000; } server { listen 80; server_name your-domain.com www.your-domain.com; client_max_body_size 20M; # 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; location / { proxy_pass http://django_app; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host; proxy_redirect off; proxy_buffering off; } location /static/ { alias /app/smartsoltech/staticfiles/; expires 30d; add_header Cache-Control "public, immutable"; } location /media/ { alias /app/smartsoltech/media/; expires 30d; add_header Cache-Control "public, immutable"; } # Deny access to sensitive files location ~ /\. { deny all; access_log off; log_not_found off; } }