[squid-users] help to redirect http request to another squid proxy
Amos Jeffries
squid3 at treenet.co.nz
Sun Feb 28 08:21:35 UTC 2021
On 26/02/21 8:47 pm, jmpatagonia wrote:
> Hello I need help to redirect request http/https from a specific domain
> to another squid proxy server.
>
> Like a domain for example microsoft.com <http://microsoft.com> redirect
> o transfer all request to another squid proxy server.
>
Firstly, "redirect" has a meaning in HTTP and it has nothing to do with
what you seem to be wanting to do.
You are using cache_peer, which is the directive you need to be looking
at for the "HTTP routing" that meets your need.
However, there are some things that look odd in the details you
provided. I suspect they are related to other things not mentioned that
you have dome to the system setup thinking "redirect" was needed.
> I try to use this:
> #################################################
> http_port xx.xx.xx..xx:8080 accel
This is a reverse-proxy. The CONNECT method is not meant to be sent to
reverse-proxies.
> acl microsoft_acl dstdomain microsoft.com <http://microsoft.com>
> cache_peer yy.yy.yy.yy parent 8080 0 name=proxy60 default
"default" indicates the peer is able to handle any traffic and can be
used as a backup route when DIRECT fails.
You should not use that option on a peer where only certain site/domain
are serviced.
> cache_peer_access proxy60 allow microsoft_acl
> cache_peer_access proxy60 deny all
> #################################################
> but not wok, error :
> 26/Feb/2021:07:23:27 -0300 || - || xx.xx.xx.xx || TAG_NONE/405|| CONNECT
> || error:method-not-allowed || text/html
>
What does your logformat define all those log fields to mean ?
There are 4 IP addresses involved in a proxy transaction and it is
unclear why the xx.xx.xx.xx is the one being logged.
Why are you using port 8080?
Last I saw Microsoft do not host their website using port 8080.
Hint: for "just an example name" use the domains which are registered
specially for that purpose: example.com, example.net, example.org. It
avoids confusing us into thinking microsoft.com is *actually* the domain
you are hosting - there are implications to hosting their site which
change the answers you could get.
Amos
More information about the squid-users
mailing list