wdaike / ngx_upstream_jdomain

An asynchronous domain name resolve module for nginx upstream
78 stars 32 forks source link

Problems on latest nginx / non port 80? #4

Open roynasser opened 8 years ago

roynasser commented 8 years ago

Is anyone using this successfully? I'm trying to use this to refresh DNS entries on a containerized structure, however I keep getting errors like:

nginxweb_1 | 2016/01/21 19:28:18 [emerg] 1#0: invalid parameter "9000" in /etc/nginx/conf.d/upstream.conf:2
nginxweb_1 | nginx: [emerg] invalid parameter "9000" in /etc/nginx/conf.d/upstream.conf:2

Here is my upstream.conf

upstream php-upstream {
    jdomain php5 9000;
}

If I remove the 9000 it "works", but doesnt work for my needs as a backend in proxypass as it defaults to port 80 and I get errors saying the backend isnt available at IP:80...

nzwalker commented 8 years ago

You need to specify the port with:

upstream php-upstream {
    jdomain php5 port=9000;
}