Re: ProxyPass to an IPv6 link-local address

Paul <[email protected]> Thu, 17 Jul 2025 18:22:55 -0400
Newsgroups gmane.comp.apache.user
Organization Stormy Weather
Message-ID <[email protected]>
On 7/17/25 17:04, Lexi Winter wrote:
> hello,
> 
> i am having trouble trying to use ProxyPass to proxy a request to an
> HTTP backend on an IPv6 link-local address.  for example, using this:
> 
> <Location />
> 	ProxyPass "http://[fe80::2%vm.cgit]:80"
> </Location>
> 
> returns an error:
> 
> AH01083: error parsing URL http://[fe80::2%vm.cgit]:80: Invalid host/port
> 
> i was able to get this working by adding the link-local address to
> /etc/hosts:
> 
> fe80::2%vm.cgit		cgit-backend.internal
> 
> and then using the hostname in Apache:
> 
> <Location />
> 	ProxyPass       http://cgit-backend.internal:80/
> </Location>

I'm certainly not an IPV6 expert, but you say that:

	"http://[fe80::2%vm.cgit]:80" fails
but that from /etc/hosts
	fe80::2%vm.cgit		cgit-backend.internal
you have a successful outcome

Have you tried without the "[ ]" square brackets in the Location directive?

RFC 1738 is pretty clear that "[" and "]" are unsafe characters -- I 
would therefore expect apache2 to throw an error.

Hope this helps,
Paul




> 
> however, i feel like it should be possible to use an IP address in
> ProxyPass without having to edit /etc/hosts.
> 
> this feels like a bug to me but, based on the bug reporting guidelines,
> i thought i would ask here first.  so, does anyone have any suggestions?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>