# Example Nginx server block. Replace host/cert paths for your deployment.
server {
    listen 443 ssl http2;
    server_name hmis.example.gov.ng;
    root /var/www/ojodu-lcda-hmis/public;
    index index.php;
    ssl_certificate /etc/letsencrypt/live/hmis.example.gov.ng/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/hmis.example.gov.ng/privkey.pem;
    client_max_body_size 12m;
    add_header X-Frame-Options DENY always;
    add_header X-Content-Type-Options nosniff always;
    add_header Referrer-Policy strict-origin-when-cross-origin always;
    add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
    location / { try_files $uri $uri/ /index.php?$query_string; }
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
    location ~ /\.(?!well-known).* { deny all; }
    location ^~ /storage/ { deny all; }
}
