For Apache it is much better to forward the requests via cache_peer..
cache_peer 127.0.0.1 parent 81 0 no-query login=PASS
never_direct allow all
And I would seriously recomment you to run Apache on port 80, but bound
to 127.0.0.1. Having different URLs to the "backend" server than
requested by the client will give you problems.
Regards
Henrik
ons 2002-11-13 klockan 14.26 skrev Thiago Madeira de Lima:
>
>
> I'm using squid (squid-2.5.STABLE1/linux/kernel 2.4.19) as a HTTP
> Server Accelerator for 2 servers (apache/iis) .
>
> In my configuration all requests to any domain that I own go to my
> squid. (squid.foo.bar) . This squid has an redirect program that
> rewrites any www.mydomain.com to isrvwww.mydomain.com and in my dns
> (isrv means internal server) isrvwww.mydomain.com is pointed either the
> IIS or the Apache.
>
> The problem is that the squid is giving me the following message :
> "Forwading Loop found" and stops working fine. It breaks links and don't
> load many URLs. Reading the docs I found that its cause and started
> denying all Via headers, and got it working. But I don't think it is the
> better solution for that. Any tips in that?
>
> sample :
>
> www.foo.bar -> squid
> squid rewrites www.foo.bar to isrvwww.foo.bar and fetch it from the
> apache server rewriting the Host: header.
> apache returns to squid
> squid returns to user.
>
>
> I wanted to know there any way to log squid in 2 different log
> formats? I want to have the HTTP 'look like' logfile to send to my
> customers but I still want the access.log in the squid format to see
> some statistics about squid caching.
>
> Thanks alot
> thiago lima
>
> bellow is my server info.
>
>
> --- data
>
> I'm using a redir program homemade in perl . It looks just like this :
>
> while (<>)
> {
> s/www.host.com/isrvwww.host.com/ ;
> print ;
> }
>
>
> my conf :
>
> http_port 80
> hierarchy_stoplist cgi-bin ?
> acl QUERY urlpath_regex cgi-bin \?
> no_cache deny QUERY
> cache_dir diskd /mnt/1/cache 9000 16 256 Q1=64 Q2=72
> cache_access_log /var/log/squid/access.log
> cache_log /var/log/squid/cache.log
> cache_store_log none
> emulate_httpd_log on
> log_ip_on_direct on
> mime_table /usr/local/squid-2.5.STABLE1/etc/mime.conf
> diskd_program /usr/local/squid-2.5.STABLE1/libexec/diskd
> redirect_program /usr/local/squid-2.5.STABLE1/libexec/redir.pl
> redirect_children 30
> redirect_rewrites_host_header on
> auth_param basic children 5
> auth_param basic realm Squid proxy-caching web server
> auth_param basic credentialsttl 2 hours
> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern . 0 20% 4320
> negative_ttl 1 minutes
> negative_dns_ttl 1 minutes
> acl all src 0.0.0.0/0.0.0.0
> acl manager proto cache_object
> acl localhost src 127.0.0.1/255.255.255.255
> acl to_localhost dst 127.0.0.0/8
> acl SSL_ports port 443 563
> acl CONNECT method CONNECT
> http_access allow manager localhost
> http_access deny manager
> http_access deny !Safe_ports
> http_access deny CONNECT all
> http_access allow all
> http_reply_access allow all
> icp_access allow all
> cache_effective_user squid
> cache_effective_group squid
> visible_hostname hosting.foo.bar
> unique_hostname cache1.foo.bar
> httpd_accel_port 80
> httpd_accel_host virtual
> httpd_accel_single_host off
> httpd_accel_with_proxy off
> httpd_accel_uses_host_header on
> logfile_rotate 10
> forwarded_for on
> buffered_logs on
> header_access Via deny all
> snmp_port 3401
> snmp_access allow snmppublic cristo
> snmp_access deny all
> uri_whitespace encode
> coredump_dir /mnt/1/cache
> redirector_bypass off
> ignore_unknown_nameservers on
> high_memory_warning 0
> ie_refresh off
>
>
Received on Wed Nov 13 2002 - 06:09:56 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:18 MST