I have two projects one is API(Laravel APP
) and another one is a frontend app(Nuxt APP
). I want to serve these projects on the same domain using valet
on my local. Problem is that I'm not able to do so as both my subdomains are pointing to the frontend app(Nuxt APP
). Following are the steps to reproduce the issue
Step 1:
Here each subdomain has been registered using the following commands and is pointing to the right directory,
valet link api.nuxttodo
valet link app.nuxttodo
Note: At this point, if I access api.nuxttodo.test
it do successfully open the API(Laravel App
)
Two links
(sub-domains) that are generated after running these commands are as follows
Step 2:
After that I have added a proxy for the app.nuxttodo.test
domain using the command because my frontend app(Nuxt App
) is running on http://localhost:60539
valet proxy app.nuxttodo http://localhost:60539
One proxy
is as follows
Problem:
Now issue is that both subdomains are now pointing to the same project. Both api.nuxttodo.test
and app.nuxttodo.test
URL are now opening the frontend app(Nuxt APP
) and I'm not able to access my API(Laravel App
) which was accessible before running the proxy.