upstream innerdjango {
    server backend:8000;
}

upstream innerreact {
    server frontend:3000;
}

server {
    listen 80;
    listen [::]:80;

    server_name api.portal.acconcept.ru www.api.portal.acconcept.ru;
    server_tokens off;

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

    location / {
        return 301 https://api.portal.acconcept.ru$request_uri;
    }
}

server {
    listen 80;
    listen [::]:80;

    server_name portal.acconcept.ru www.portal.acconcept.ru;
    server_tokens off;

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

    location / {
        return 301 https://portal.acconcept.ru$request_uri;
    }
}
