I want to separate hosting of my app and website. The hierarchy is as follows:
example.com
- website hosted at DigitalOceanexample.com/*
- SPA hosted at Firebase HostingSince DNS does not allow to point the subdirectories, is there any wiser way, to accomplish this?
Thanks in advance!
As the subdomain solution isn't favored, you could try a proxy like nginx to route traffic based on the path to different backends. An example configuration might look something like this:
server {
listen ...;
...
location / {
proxy_pass http://<your-website>;
}
location /app {
proxy_pass http://<your-app>;
}
location /another-app {
proxy_pass http://<another-app>;
}
...
}
Source: https://gist.github.com/soheilhy/8b94347ff8336d971ad0
You may also want to check whether the Digital Ocean load balancer product offers path based routing.