well, if you just follow the mentioned guide and also have an nginx instance running outside the docker container(s), it will clash.
what you need, is separate the two by configuring a different subdomain for each one, see this link for example.
or, you could use different ports for nginx outside (e.g. 80) and inside (e.g. 8080) the docker container - this is very simple, but will be problematic for port 443 (the ssl port) which cannot be changed as easy.
the correct solution for this is a reverse proxy, IMHO, search for ‘nginx reverse proxy subdomain’, you will need this also for the first proposal.
I have fiddled with apache2 reverse proxys for some time in the past and found it rather awkward, then discovered Caddy, which is much easier, see https://caddyserver.com/docs/quick-starts/reverse-proxy.
but maybe nginx is easy, too (I never tried).
1 Like