nginx - serving backend and frontend on different endpoints and same domain

I have installed nginx on OS X with php7.1, mysql and so on... and the basic testing example is working. When I try to configure nginx to serve Laravel backend on user.domain.dev/api/... and Angular