[SQU] httpd accelleration, httpd and squid running on differents ports

From: Xavier Renaut <xavier@dont-contact.us>
Date: Fri, 9 Mar 2001 13:59:21 -0500 (EST)

Hello,

I'm trying to accelerate my httpd server with squid.

I'm hosting www.nagleinc.com and www.ideasandassociates.com, on the same ip
(216.95.242.184) (namevirtualhost in apache conf)

Here is my squid conf :

=======================
http_port 216.95.242.184:80

cache_effective_user nobody
cache_effective_group nobody

acl domains dst ideasandassociates.com nagleinc.com
acl all src 0.0.0.0/0.0.0.0

http_access allow all
http_access deny !domains

httpd_accel_host www.ideasandassociates.com
httpd_accel_port 82

httpd_accel_with_proxy off

httpd_accel_uses_host_header on
=================================

the problem is that sometimes, apache answer that it is running on port 82....
for exemple, when redirecting if accessing on a directory without the trailing
slash....

the user access the directory http://www.ideasandassociates.com/portfolio,
apache redirects him to http://www.ideasandassociates.com:82/portfolio/
and the user get stuck. (the firewall stops the 82 port; which is normal....)

here is a try with lynx :
(which you can test)
=====================================
$ lynx www.ideasandassociates.com/portfolio

Looking up www.ideasandassociates.com first
Looking up www.ideasandassociates.com
Making HTTP connection to www.ideasandassociates.com
Sending HTTP request.
HTTP request sent; waiting for response.
HTTP/1.0 301 Moved Permanently
Data transfer complete
HTTP/1.0 301 Moved Permanently
Looking up www.ideasandassociates.com:82
Making HTTP connection to www.ideasandassociates.com:82
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://www.ideasandassociates.com/portfolio
====================================

I also try to put :

httpd_accel_host localhost

in which case squid should access to 127.0.0.1,
but, when a do a tcpdump -i lo, I see that squid is accessing 216.95.242.184:82

If I could let squid ask httpd on the lo interface, squid could bind on
216.95.242.184:80, apache on 127.0.0.1:80, and squid forwarding requests to
127.0.0.1:80...

this way apache will redirect to the port 80, which is the right port.

I saw another solution, which is that the firewall can rewrite
packets this way 216.95.242.184:82 -> 216.95.242.184:80.
this way, squid will get every request. but if the firewall from the client
forbid to get out to the 82 port, it doesn't work.

Have any ideas ?

thanks

xavier

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Fri Mar 09 2001 - 12:04:24 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:35 MST