Hello, is it possible to run different containers with different Domains?
For example: container 1 has an application with port 123456 running and the container should only reachable on app1.domain.com
and container 2 has the same application (with port 123456) but should only reachable with app2.domain.com
yours sincerely lassdas
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
You can achieve that by running a reverse proxy server (such as nginx) in front of the applications.
First, install nginx on your droplet that is hosting the containers:
Then, for each application, create a server block:
and insert the following into the file (replace app1.domain.com and 2368 as needed):
Enable the server block:
Once you have done that for all applications, restart nginx: