You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# test2.example.com:8545
upstream test2.example.com:8545 {
## Can be connect with "webproxy" network
server 172.19.0.8 down;
}
server {
server_name test2.example.com:8545;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://test2.example.com:8545;
}
}
# test1.example.com:8546
upstream test1.example.com:8546 {
## Can be connect with "webproxy" network
server 172.19.0.8 down;
}
server {
server_name test1.example.com:8546;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://test1.example.com:8546;
}
}
Servername has a port and this is a trouble. Also I dont sure that upstream has a right name.
Can you please provide the correct nginx template to work with more than one exposed port.
Thank you
The text was updated successfully, but these errors were encountered:
I'm having this problem too. I have EXPOSE with more than one port listed in the Dockerfile. But only one -p given on the command line. The upstream was missing the port. If I EXPOSE only a single port it works.
I would think the correct functionality should be one upstream DNS name but with multiple server entries that include each port number exposed by -p.
There is no support for multiple hosts with different ports as of now. This is a feature request that has existed for quite some time now, as you can see in #59
Hello there!
I have a docker app that exposes two ports.
So my compose config is
And nginx template parse it like that
Servername has a port and this is a trouble. Also I dont sure that upstream has a right name.
Can you please provide the correct nginx template to work with more than one exposed port.
Thank you
The text was updated successfully, but these errors were encountered: