Scormen
October 14th, 2008, 02:19 PM
Hi all,
I have succesfully setuped a transparent cache-proxy server with Squid 3.
On the same server I also would like to run a Apache (2.2) webserver, but that is the real problem... It looks like it isn't simple to run Squid and Apache on the same machine.
Does anybody knows what to do, or how I can realise this?
I'm using this rule in iptables for routing the trafic to port 80 to the Squid port.
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
I have tried also:
iptables -t nat -A OUTPUT -m owner ! --gid-owner 33 -p tcp --dport 80 -j REDIRECT --to-port 3128
and also:
iptables -A OUTPUT -p tcp -m owner ! --gid-owner 33 -m tcp -d www.ubuntu.lan --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp -m owner ! --gid-owner 33 -m tcp --dport 80 -j REDIRECT --to-ports 3128
But nothing works...
Do I also have to edit a Apache file or still something in the Squid configuration?
Thanks for your time,
Kris
I have succesfully setuped a transparent cache-proxy server with Squid 3.
On the same server I also would like to run a Apache (2.2) webserver, but that is the real problem... It looks like it isn't simple to run Squid and Apache on the same machine.
Does anybody knows what to do, or how I can realise this?
I'm using this rule in iptables for routing the trafic to port 80 to the Squid port.
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
I have tried also:
iptables -t nat -A OUTPUT -m owner ! --gid-owner 33 -p tcp --dport 80 -j REDIRECT --to-port 3128
and also:
iptables -A OUTPUT -p tcp -m owner ! --gid-owner 33 -m tcp -d www.ubuntu.lan --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp -m owner ! --gid-owner 33 -m tcp --dport 80 -j REDIRECT --to-ports 3128
But nothing works...
Do I also have to edit a Apache file or still something in the Squid configuration?
Thanks for your time,
Kris