ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nginx использует IPv6 в proxy pass, даже если он отключен


  • To: nginx-ru@xxxxxxxxx
  • Subject: Nginx использует IPv6 в proxy pass, даже если он отключен
  • From: "Antohat" <nginx-forum@xxxxxxxx>
  • Date: Wed, 31 Jul 2013 04:06:27 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=helium.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=2UIxi7zDoamoepZ3+F+MoGTpy1b3BUXDyc9FHxhlwXA=; b=fwgLL+kZmJlGuGYpyU3ddhqcH5ElEK8wV0cpNxSh1AMOwVkV0ztMxcInlRVK1hVYEdlrWlfm4FrOgFvtucYUnjSu+fcb7GfANiZVd+MUZRptJL92S5weSPnCWg3haGKLfY9kvYQ0VNeh48IZzrNPh8nUdsM+STRKhXILLJ4icrI=;

Добрый день,

На сервере отключен IPv6. На nginx настроено проксирование на upstream c
поддержкой IPv4 и IPv6.

Nginx периодически (раз в 5 секунд) пытается отправлять запросы на IPv6 и
соответственно обламывается с ошибками:

2013/07/30 00:25:06 [error] 1930#0: *1482670 connect() to
[AAAA:BBBB:C:DDD:E:F:GGG:HHH]:443 failed (101: Network is unreachable) while
connecting to upstream, client: AA.BB.CC.DD, server: example.com, request:
"GET /download/file HTTP/1.0", upstream:
"https://[AAAA:BBBB:C:DDD:E:F:GGG:HHH]:443/download/file";, host:
"example.com"

Как можно отключить IPv6 для proxy_pass?

# nginx.conf:
upstream download {
  server download.example.com:443;
  keepalive 8;
}

location /download {
  proxy_set_header      X-Forwarded-For  $proxy_add_x_forwarded_for;
  proxy_set_header      Connection "";
  proxy_ignore_headers  X-Accel-Redirect;
  proxy_http_version    1.1;
  resolver              8.8.8.8;
  resolver_timeout      5s;
  proxy_pass            https://download;
}

nginx -V: 
nginx version: nginx/1.4.2
built by gcc 4.7.2 (Debian 4.7.2-5)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid
--lock-path=/var/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx
--with-http_ssl_module --with-http_realip_module --with-http_addition_module
--with-http_sub_module --with-http_dav_module --with-http_flv_module
--with-http_mp4_module --with-http_gunzip_module
--with-http_gzip_static_module --with-http_random_index_module
--with-http_secure_link_module --with-http_stub_status_module --with-mail
--with-mail_ssl_module --with-file-aio --with-http_spdy_module
--with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro
--with-ipv6

uname -a:
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,241403,241403#msg-241403

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.