# Super Admin
server {
    listen 80;
    server_name manage.meshkee.com;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        root /var/www/meshkee/super-admin;
        try_files $uri $uri/ /index.html;
    }
}

# Business dashboards — business.<apex>
server {
    listen 80;
    server_name ~^business\.(?<apex>.+)$;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        root /var/www/meshkee/business;
        try_files $uri $uri/ /index.html;
    }
}

# Customer dashboards — customer.<apex>
server {
    listen 80;
    server_name ~^customer\.(?<apex>.+)$;

    location /.well-known/acme-challenge/ {
        root /var/www/certbot;
    }

    location / {
        root /var/www/meshkee/customer;
        try_files $uri $uri/ /index.html;
    }
}
