# Incluir dentro del bloque server HTTPS existente.
# Se asume: root /var/www/html;

location ^~ /microerp/ {
    index index.php;
    try_files $uri $uri/ /microerp/index.php?$query_string;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ ^/microerp/(app|config|database|deploy|docs|scripts|storage|tests)/ {
        deny all;
    }

    location ~* \.(sqlite|sqlite-wal|sqlite-shm|sql|log|sh|md)$ {
        deny all;
    }
}

