events {
    worker_connections 1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    
    sendfile        on;
    keepalive_timeout  65;
    
    # HTTP server - for internal proxy use only
    server {
        listen 3000;
        server_name motovaultpro.com *.motovaultpro.com localhost;
        
        root /usr/share/nginx/html;
        index index.html;

        # Prevent nginx from including internal port in redirects
        # (Traefik handles external-facing port 443)
        absolute_redirect off;
        
        # Handle client-side routing
        location / {
            try_files $uri /index.html;
        }
        
        # Enable gzip compression
        gzip on;
        gzip_vary on;
        gzip_min_length 1024;
        gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
    }
}
