server {
    listen 80;
    server_name _;  # default catch-all

    # Root for the main landing page
    root /usr/share/nginx/html;

    # Serve the index page by default
    index index.html;

    # Explicit location for /mongo-ops/
    location /mongo-ops/ {
        root /usr/share/nginx/html;
        index index.html;
    }

    # Explicit location for /api/blog/
    location /api/blog/ {
        root /usr/share/nginx/html;
        index index.html;
    }

    # Explicit location for /tutorials/
    location /tutorials/ {
        root /usr/share/nginx/html;
        index index.html;
    }

    # Optional: serve static assets (CSS, JS, images)
    location / {
        try_files $uri $uri/ /index.html;
    }

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;
}
