Comment 1 for bug 640511

Revision history for this message
Amos Jeffries (yadi) wrote :

This is a feature designed for maximum compatibility with other software.

From squid developer discussions:
" hno:
 default port in accel mode is the listening port unless told otherwise by the host header or vport. If you run Squid on port 3128 but it's actually processing port 80 requests then you need to tell this to squid with vport=80. It's hard to automatically account for NATs or other reverse proxies infront remapping things in unexpected manners without config hints.
this default port == listening port is needed to support accel mode on non-port80 in an clean manner.

note that you also have this same issue for the same reasons if you run Squid (:80) -> Apache (:8080) unless you tell Apache to override it's idea of the listening port.

the short answer is: Do not remap ports in reverse proxy setups, doing so always bites back one way or another. Use IP addresses instead for request routing purposes.
"

In response to the multiple backends problem:
 If the backends are themselves configurable to separate the domain/port they are listening on from the public domain/port this is a non issue.

 Squid can listen on multiple ports quite happily, each of which will perform this same Host: re-writing to its own number and can (a) be dedicated to requests going to certain backends using that port. or (b) have their own vport=N option correcting the port back to the public one for subsequent URL generation.