server {
    listen 80;
    server_name billing.example.com;
    root /var/www/billingnet/web;
    index index.php;
    client_max_body_size 10m;
    location / { try_files $uri $uri/ /index.php?$query_string; }
    location /wa-api/ { proxy_pass http://127.0.0.1:3100/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
    location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.3-fpm.sock; }
    location ~ ^/\. { deny all; }
    location ~ ^/(config|database|bot|storage)/ { deny all; }
}
