How to disable ipv6 in nginx?

Francis Daly francis at daoine.org
Thu Nov 15 14:15:29 UTC 2018


On Thu, Nov 15, 2018 at 11:10:08AM +0000, rough lea wrote:

Hi there,

> I am a newbie running tusd server on macos High Sierra behind an Nginx Proxy running within a docker container. In the logs, I notice that before an _UploadCreated_ event is received there is an attempt to connect to tusd using ipv6 loopback address which fails. 
> 

Your config says

>     proxy_pass  http://localhost:1080/files/;

Your log says

> _[crit] 23#23: *4 connect() to [::1]:1080 

Presumably your system resolver resolves the word "localhost" to the
IPv6 address [::1]?

If you change your config to

    proxy_pass  http://127.0.0.1:1080/files/;

does it do what you want?

(The alternative, of configuring your system resolver to resolve
"localhost" to the IPv4 address 127.0.0.1, is probably more work.)

That does not answer the main question you asked; but might resolve the
immediate issue.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list