Welcome! Log In Create A New Profile

Advanced

IPv6 fails for set_real_ip_from in 1.2.1

Posted by dakrer 
dakrer
IPv6 fails for set_real_ip_from in 1.2.1
June 11, 2012 03:00PM
I noticed in the 1.2.1 changelog that set_real_ip_from is supposed to
support IPv6 addresses. Unfortunaly I get a configuration error when I
try it.

This works fine:
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;

This fails:
set_real_ip_from 127.0.0.1;
set_real_ip_from ::1;
real_ip_header X-Forwarded-For;


$ nginx -t
nginx: [emerg] invalid parameter "::1" in nginx.conf:22
nginx: configuration file nginx.conf test failed

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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Ruslan Ermilov
Re: IPv6 fails for set_real_ip_from in 1.2.1
June 11, 2012 09:40PM
On Mon, Jun 11, 2012 at 08:59:38AM -0400, dakrer wrote:
> I noticed in the 1.2.1 changelog that set_real_ip_from is supposed to
> support IPv6 addresses. Unfortunaly I get a configuration error when I
> try it.
>
> This works fine:
> set_real_ip_from 127.0.0.1;
> real_ip_header X-Forwarded-For;
>
> This fails:
> set_real_ip_from 127.0.0.1;
> set_real_ip_from ::1;
> real_ip_header X-Forwarded-For;
>
>
> $ nginx -t
> nginx: [emerg] invalid parameter "::1" in nginx.conf:22
> nginx: configuration file nginx.conf test failed

For IPv6 to work, nginx should be built with --with-ipv6.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login