# Ipv6 support for proxy\_pass

**URL:** <https://www.ruby-forum.com/t/ipv6-support-for-proxy-pass/217663>\
**Category:** NGINX\
**Created:** [March 8, 2012, 2:36am UTC](https://www.ruby-forum.com/t/ipv6-support-for-proxy-pass/217663 "2012-03-08T02:36:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 8, 2012, 2:36am UTC](https://www.ruby-forum.com/t/ipv6-support-for-proxy-pass/217663/1 "2012-03-08T02:36:55Z")

</div>

Hi,

Attached is a simple patch to proxy\_pass to an IPv6 upstream.  
It currently works only with a variable. proxy\_pass ::1; wont’ work for  
instance.

but this will :

set $addr “[::1]:8080”;  
proxy\_pass http://$addr;

You also need to add --with-ipv6 to your configure line.

Happy hacking,  
Matthieu.

---

<div class="post-metadata">

**Author:** ![Matthieu\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@Matthieu\_T](https://www.ruby-forum.com/u/Matthieu_T)\
**Post date:** [March 8, 2012, 11:15am UTC](https://www.ruby-forum.com/t/ipv6-support-for-proxy-pass/217663/2 "2012-03-08T11:15:17Z")

</div>

Hello!

On Wed, Mar 07, 2012 at 05:35:56PM -0800, Matthieu T. wrote:

> You also need to add --with-ipv6 to your configure line.

This should be addressed in ngx\_parse\_url(). The ipv6 cleanup is  
planned somewhere after 1.1.x become stable.

Maxim D.
