I have a few apps running in a aws instance with Dokku. I'm using virtual hostname, and together with some DNS configuration of my registered domain, I have the following for one of them: mydomain.com
is a CNAME
record pointing to the aws instance address, and Dokku+nginx take care of redirecting to the correct app/process.
The path for all API calls is /parse
, as I'm using the open source Parse Server. The final server url is mydomain.com/parse
.
What I want to achieve, ideally, is the following: api.mydomain.com
gets redirected to mydomain.com/parse
, api.mydomain.com/someFunction
to mydomain.com/parse/someFunction
and so on.
When researching to see how this may be possible, I found that this can be done easily with nginx, like explained here in this answer.
I can even change manually the nginx config file, but I'm afraid that it will be overwritten in future changes. How can this ideally be achieved with nginx
on Dokku?