I would like to to route requests based on a path to two different Angular applications. So when i request http://example.com/admin is routes to one app http://example.com/client routes to the second app. I have the following config but all requests are always sent to the nginx default page. Configuration is as follows:
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name _;
        location /admin {
                root /home/ubuntu/apps/admin/;
                index index.html;
                try_files $uri $uri/ /index.html?$args;
        }
        location /client {
                root /home/ubuntu/apps/client;
                index index.html;
                try_files $uri $uri/ /index.html?$args;
        }
}
No other confs are in /etc/nginx/sites-enabled and nginx.conf is default post install on Ubuntu. Any help is appreciated.
 
    