Re: [squid-users] acl-specific http_port

From: Mikhail Teterin <mi@dont-contact.us>
Date: Tue, 27 Mar 2001 19:55:32 -0500 (EST)

Thanks, I think, I'm getting there. Here is what I did:

http_port 80 # To be the only one :)
httpd_accel_host virtual # We need to support multipl vhosts
httpd_accel_port 8015 # This is where one of servers listens;
                                # this server will NOT grok hostname in
                                # the request, BTW
httpd_accel_with_proxy on # We need this too
acl S urlpath_regex ^/dufus/|^/$ # Only the URLs, which start
                                # with /dufus/ or the main page (/)
cache_peer localhost parent 8000 0 no-query # Apache listens on localhost:8000
never_direct allow S # Never fetch /dufus/ and / directly
cache_peer_access localhost allow S
cache_peer_access localhost deny !S

This seems to be working, except that squid responds with ERR_DNS_FAIL
for its own hostname. A simple nslookup on the same machine resolves it
perfectly, and it is also listed in /etc/hosts (with 127.0.0.1 IP). Any
ideas? It was working fine as an accelerator for just Apache before...

Thanks. Yours,

        -mi

> httpd_accel_host your.visible.domain
> [optionally: httpd_accel_uses_host_header on]
> httpd_accel_port 80
>
> never_direct allow all
>
> cache_peer server1 parent port1 0 no-query
> cache_peer server2 parent port2 0 no-query
> [create two aliases for the same IP if both run on the same server but
> differnt ports]
>
> acl special urlpath_regex dufus
> cache_peer_access server1 deny dufus
> cache_peer_access server2 allow dufus
 
> This setup assumes the server can accept requests with a full URL (a
> MUST in HTTP/1.1 specifications) but unfortunately not all servers
> do..

Well, tclhttpd server treats such requests as requests for proxying...

        -mi
Received on Tue Mar 27 2001 - 17:55:37 MST

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