lets say that now I have different app running on the same server on different path:
Default bridge network has gateway on 172.17.0.1
. You can use this IP address in your nginx.conf
server {
listen 80;
server_name example.com;
location /app1 {
proxy_pass http://172.17.0.1:81;
}
location /app2 {
proxy_pass http://172.17.0.1:82;
}
}
They will be accessible using port 80
from outside
You can check your bridge gateway IP address by running command docker network inspect bridge