server {
    listen 8080 default_server;
    server_name _;

    location /static {
        alias /www/static;
    }

    location /admin-app {
        alias /www/admin-app;
    }

    location / {
        proxy_pass http://api-logic-server:5000;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
    }
}

server {
    listen              443 ssl;
    server_name         _;
    ssl_certificate     /etc/ssl/certs/example.com.crt;
    ssl_certificate_key /etc/ssl/private/example.com.key;

    location /static {
        alias /www/static;
    }

    location /admin-app {
        alias /www/admin-app;
    }

    location / {
        proxy_pass http://api-logic-server:5000;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
    }
}
