proxy chaining to squid
am 31.01.2010 12:33:01 von David Cotter
--001485f772f0613ea5047e743c02
Content-Type: text/plain; charset=ISO-8859-1
I have two virtual hosts and a squid proxy running. I want to be able to use
the squid proxy on port 80 though it is running on 3128.
I have something like this:
NameVirtualHost *:80
Listen 80
ServerName default.com
ProxyPass / http://localhost:3128/
ProxyPassReverse / http://localhost:3128/
ProxyVia on
ServerName myfomain.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
This does not work I get an error when I set my browser to use
111.222.22.22:80 as proxy what I want is for apache to chain to squid.
GET /urlrequested.html HTTP/1.1
Host: localhost:3128
....
Invalid Request
Any help on what I need to do to get this working appreciated.
David
Host: localhost:3128
--001485f772f0613ea5047e743c02
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I have two virtual hosts and a squid proxy running. I want to be able to us=
e the squid proxy on port 80 though it is running on 3128.
I have so=
mething like this:
NameVirtualHost *:80
Listen 80
<VirtualH=
ost *:80>
ServerName
ProxyPass /
href=3D"http://localhost:3128/">http://localhost:3128/
ProxyPassRev=
erse /
Pro=
xyVia on
</VirtualHost>
<VirtualHost *:80>
ServerName
=3D"http://myfomain.com">myfomain.com
ProxyPass /
localhost:8080/">http://localhost:8080/
ProxyPassReverse /
=3D"http://localhost:8080/">http://localhost:8080/
</VirtualHost>
This does not work I get an error when I set my browser to use
ref=3D"http://111.222.22.22:80">111.222.22.22:80 as proxy what I want i=
s for apache to chain to squid.
GET /urlrequested.html HTTP/1.=
1
Host: localhost:3128
...
Invalid Request
Any help on what I ne=
ed to do to get this working appreciated.
David
Host: loc=
alhost:3128
=A0
--001485f772f0613ea5047e743c02--
Re: proxy chaining to squid
am 01.02.2010 10:08:28 von Martin Barry
$quoted_author = "David Cotter" ;
>
> I have two virtual hosts and a squid proxy running. I want to be able to use
> the squid proxy on port 80 though it is running on 3128.
Why? If you describe a bit more exactly what you are trying to achieve it
would help us help you.
> This does not work I get an error when I set my browser to use
> 111.222.22.22:80 as proxy what I want is for apache to chain to squid.
You almost certainly don't want to configure your browser to use Apache as a
generic proxy.
> GET /urlrequested.html HTTP/1.1
>
> Host: localhost:3128
> ...
> Invalid Request
Well, it's an invalid request. Port numbers don't belong in host headers.
cheers
Marty
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: proxy chaining to squid
am 01.02.2010 11:29:32 von David Cotter
n Mon, Feb 1, 2010 at 9:08 AM, Martin Barry wrote:
> $quoted_author = "David Cotter" ;
>>
>> I have two virtual hosts and a squid proxy running. I want to be able to use
>> the squid proxy on port 80 though it is running on 3128.
>
> Why? If you describe a bit more exactly what you are trying to achieve it
> would help us help you.
>
>
>> This does not work I get an error when I set my browser to use
>> 111.222.22.22:80 as proxy what I want is for apache to chain to squid.
>
> You almost certainly don't want to configure your browser to use Apache as a
> generic proxy.
>
>
>> GET /urlrequested.html HTTP/1.1
>>
>> Host: localhost:3128
>> ...
>> Invalid Request
>
> Well, it's an invalid request. Port numbers don't belong in host headers.
>
I have a server that runs a web site. I also want that server to host
a squid http proxy for a different project - but squid has to be
listening on port 80 and so does the web server. So What I am trying
do do is send the request appropriately based on domain name. If is is
xyz.com then send it to the web site otherwise chain it to squid.
Thanks,
David
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: proxy chaining to squid
am 01.02.2010 11:33:30 von Emmanuel Bailleul
> -----Message d'origine-----
> De=A0: David Cotter [mailto:davidcotter@gmail.com]
> Envoyé : lundi 1 f=E9vrier 2010 11:30
> À : users@httpd.apache.org
> Objet=A0: Re: [users@httpd] proxy chaining to squid
>=20
> n Mon, Feb 1, 2010 at 9:08 AM, Martin Barry wrote:
> > $quoted_author =3D "David Cotter" ;
> >>
> >> I have two virtual hosts and a squid proxy running. I want to be able
> to use
> >> the squid proxy on port 80 though it is running on 3128.
> >
> > Why? If you describe a bit more exactly what you are trying to achieve
> it
> > would help us help you.
> >
> >
> >> This does not work I get an error when I set my browser to use
> >> 111.222.22.22:80 as proxy what I want is for apache to chain to squid.
> >
> > You almost certainly don't want to configure your browser to use Apache
> as a
> > generic proxy.
> >
> >
> >> GET /urlrequested.html HTTP/1.1
> >>
> >> Host: localhost:3128
> >> ...
> >> Invalid Request
> >
> > Well, it's an invalid request. Port numbers don't belong in host
> headers.
> >
>=20
> I have a server that runs a web site. I also want that server to host
> a squid http proxy for a different project - but squid has to be
> listening on port 80 and so does the web server. So What I am trying
> do do is send the request appropriately based on domain name. If is is
> xyz.com then send it to the web site otherwise chain it to squid.
> Thanks,
> David
>=20
Hi,
My previous replies have been rejected because tagged as spam ... hope this=
time it gets through ...
If you need your Apache reverse proxy as a frontend, you should have a look=
at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyrem ote as a fo=
rward proxy would be more effective than a reverse, the latter only forward=
s requests to configured origin servers.
Last, but it seems ok in your config, this "forward proxy" setup should be =
used in the default vhost (the first one listed).
=20
Regards
=20
Emmanuel
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: proxy chaining to squid
am 01.02.2010 12:29:31 von Brian Mearns
On Mon, Feb 1, 2010 at 5:33 AM, Emmanuel Bailleul
wrote:
>
>
>> -----Message d'origine-----
>> De=A0: David Cotter [mailto:davidcotter@gmail.com]
>> Envoyé : lundi 1 f=E9vrier 2010 11:30
>> À : users@httpd.apache.org
>> Objet=A0: Re: [users@httpd] proxy chaining to squid
>>
>> n Mon, Feb 1, 2010 at 9:08 AM, Martin Barry wrote:
>> > $quoted_author =3D "David Cotter" ;
>> >>
>> >> I have two virtual hosts and a squid proxy running. I want to be able
>> to use
>> >> the squid proxy on port 80 though it is running on 3128.
>> >
>> > Why? If you describe a bit more exactly what you are trying to achieve
>> it
>> > would help us help you.
>> >
>> >
>> >> This does not work I get an error when I set my browser to use
>> >> 111.222.22.22:80 as proxy what I want is for apache to chain to squid=
..
>> >
>> > You almost certainly don't want to configure your browser to use Apach=
e
>> as a
>> > generic proxy.
>> >
>> >
>> >> GET /urlrequested.html HTTP/1.1
>> >>
>> >> Host: localhost:3128
>> >> ...
>> >> Invalid Request
>> >
>> > Well, it's an invalid request. Port numbers don't belong in host
>> headers.
>> >
>>
>> I have a server that runs a web site. I also want that server to host
>> a squid http proxy for a different project - but squid has to be
>> listening on port 80 and so does the web server. So What I am trying
>> do do is send the request appropriately based on domain name. If is is
>> xyz.com then send it to the web site otherwise =A0chain it to squid.
>> Thanks,
>> David
>>
>
> Hi,
>
> My previous replies have been rejected because tagged as spam ... hope th=
is time it gets through ...
>
> If you need your Apache reverse proxy as a frontend, you should have a lo=
ok at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyrem ote as a =
forward proxy would be more effective than a reverse, the latter only forwa=
rds requests to configured origin servers.
> Last, but it seems ok in your config, this "forward proxy" setup should b=
e used in the default vhost (the first one listed).
>
> Regards
>
> Emmanuel
>
Do you want a forward proxy or reverse proxy? Based on your config, it
looks like you have it set up for reverse proxy. But if you're
configuring your browser to know about the proxy, then it's a forward
proxy. Not sure if this is the specific problem you're seeing, but I
think it will be eventually.
Hope that helps,
-Brian
--=20
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: proxy chaining to squid
am 09.02.2010 17:55:59 von David Cotter
Mon, Feb 1, 2010 at 11:29 AM, Brian Mearns wrote:
> On Mon, Feb 1, 2010 at 5:33 AM, Emmanuel Bailleul
> wrote:
>>
>>
>>> -----Message d'origine-----
>>> De=A0: David Cotter [mailto:davidcotter@gmail.com]
>>> Envoyé : lundi 1 f=E9vrier 2010 11:30
>>> À : users@httpd.apache.org
>>> Objet=A0: Re: [users@httpd] proxy chaining to squid
>>>
>>> n Mon, Feb 1, 2010 at 9:08 AM, Martin Barry wrote:
>>> > $quoted_author =3D "David Cotter" ;
>>> >>
>>> >> I have two virtual hosts and a squid proxy running. I want to be abl=
e
>>> to use
>>> >> the squid proxy on port 80 though it is running on 3128.
>>> >
>>> > Why? If you describe a bit more exactly what you are trying to achiev=
e
>>> it
>>> > would help us help you.
>>> >
>>> >
>>> >> This does not work I get an error when I set my browser to use
>>> >> 111.222.22.22:80 as proxy what I want is for apache to chain to squi=
d.
>>> >
>>> > You almost certainly don't want to configure your browser to use Apac=
he
>>> as a
>>> > generic proxy.
>>> >
>>> >
>>> >> GET /urlrequested.html HTTP/1.1
>>> >>
>>> >> Host: localhost:3128
>>> >> ...
>>> >> Invalid Request
>>> >
>>> > Well, it's an invalid request. Port numbers don't belong in host
>>> headers.
>>> >
>>>
>>> I have a server that runs a web site. I also want that server to host
>>> a squid http proxy for a different project - but squid has to be
>>> listening on port 80 and so does the web server. So What I am trying
>>> do do is send the request appropriately based on domain name. If is is
>>> xyz.com then send it to the web site otherwise =A0chain it to squid.
>>> Thanks,
>>> David
>>>
>>
>> Hi,
>>
>> My previous replies have been rejected because tagged as spam ... hope t=
his time it gets through ...
>>
>> If you need your Apache reverse proxy as a frontend, you should have a l=
ook at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyrem ote as a=
forward proxy would be more effective than a reverse, the latter only forw=
ards requests to configured origin servers.
>> Last, but it seems ok in your config, this "forward proxy" setup should =
be used in the default vhost (the first one listed).
>>
>> Regards
>>
>> Emmanuel
>>
>
> Do you want a forward proxy or reverse proxy? Based on your config, it
> looks like you have it set up for reverse proxy. But if you're
> configuring your browser to know about the proxy, then it's a forward
> proxy. Not sure if this is the specific problem you're seeing, but I
> think it will be eventually.
>
> Hope that helps,
> -Brian
Hello I wish to ProxyRemote to squid excpet for when the domain
required is www.mydomain.com. THe below look ok but doesn't work. IOs
this possibe?
Thanks,
David
NameVirtualHost *:80
Listen 80
ProxyRemote * http://localhost:8080
ServerName www.mydomain.com
ProxyPass / http://localhost:82/
ProxyPassReverse / http://localhost:82/
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: proxy chaining to squid
am 09.02.2010 18:33:01 von Tom Evans
On Tue, Feb 9, 2010 at 4:55 PM, David Cotter wrote:
> Â Mon, Feb 1, 2010 at 11:29 AM, Brian Mearns wro=
te:
>> On Mon, Feb 1, 2010 at 5:33 AM, Emmanuel Bailleul
>> wrote:
>>>
>>>
>>>> -----Message d'origine-----
>>>> De : David Cotter [mailto:davidcotter@gmail.com]
>>>> Envoyé : lundi 1 février 2010 11:30
>>>> ÃÂ : users@httpd.apache.org
>>>> Objet : Re: [users@httpd] proxy chaining to squid
>>>>
>>>> n Mon, Feb 1, 2010 at 9:08 AM, Martin Barry wrote:
>>>> > $quoted_author =3D "David Cotter" ;
>>>> >>
>>>> >> I have two virtual hosts and a squid proxy running. I want to be ab=
le
>>>> to use
>>>> >> the squid proxy on port 80 though it is running on 3128.
>>>> >
>>>> > Why? If you describe a bit more exactly what you are trying to achie=
ve
>>>> it
>>>> > would help us help you.
>>>> >
>>>> >
>>>> >> This does not work I get an error when I set my browser to use
>>>> >> 111.222.22.22:80 as proxy what I want is for apache to chain to squ=
id.
>>>> >
>>>> > You almost certainly don't want to configure your browser to use Apa=
che
>>>> as a
>>>> > generic proxy.
>>>> >
>>>> >
>>>> >> GET /urlrequested.html HTTP/1.1
>>>> >>
>>>> >> Host: localhost:3128
>>>> >> ...
>>>> >> Invalid Request
>>>> >
>>>> > Well, it's an invalid request. Port numbers don't belong in host
>>>> headers.
>>>> >
>>>>
>>>> I have a server that runs a web site. I also want that server to host
>>>> a squid http proxy for a different project - but squid has to be
>>>> listening on port 80 and so does the web server. So What I am trying
>>>> do do is send the request appropriately based on domain name. If is is
>>>> xyz.com then send it to the web site otherwise  chain it to squid=
..
>>>> Thanks,
>>>> David
>>>>
>>>
>>> Hi,
>>>
>>> My previous replies have been rejected because tagged as spam ... hope =
this time it gets through ...
>>>
>>> If you need your Apache reverse proxy as a frontend, you should have a =
look at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyrem ote as =
a forward proxy would be more effective than a reverse, the latter only for=
wards requests to configured origin servers.
>>> Last, but it seems ok in your config, this "forward proxy" setup should=
be used in the default vhost (the first one listed).
>>>
>>> Regards
>>>
>>> Emmanuel
>>>
>>
>> Do you want a forward proxy or reverse proxy? Based on your config, it
>> looks like you have it set up for reverse proxy. But if you're
>> configuring your browser to know about the proxy, then it's a forward
>> proxy. Not sure if this is the specific problem you're seeing, but I
>> think it will be eventually.
>>
>> Hope that helps,
>> -Brian
>
> Hello I wish to ProxyRemote to squid excpet for when the domain
> required is www.mydomain.com. THe below look ok but doesn't work. IOs
> this possibe?
>
> Thanks,
> David
>
> NameVirtualHost *:80
> Listen 80
>
>
> ProxyRemote * http://localhost:8080
>
>
>
> ServerName www.mydomain.com
> ProxyPass / http://localhost:82/
> ProxyPassReverse / http://localhost:82/
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> Â " Â from the digest: users-digest-unsubscribe@httpd.apache.or=
g
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Do it in reverse, run the squid proxy on port 80, and force it to go
to apache running on port 8080 for www.mydomain.com.
Something *like* this should do the trick in squid (untested):
# acl with the target domain
acl local_sites dstdomain www.mydomain.com
# real upstream cache
cache_peer 10.0.0.1 parent 3128 0 proxy-only default
# parent 'cache' is really apache
cache_peer localhost parent 8080 0
# route requests where we want them to go
cache_peer_access 10.0.0.1 deny local_sites
cache_peer_access localhost deny !local_sites
never_direct allow all
You probably don't have an upstream proxy, so you will need to read
the squid manual and extrapolate an equivalent configuration, where if
the acl doesn't match it goes direct to the host.
Cheers
Tom
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org