Search squid archive

RE: Redirecting to different server based onURLpattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe that I am getting closer but want to make sure before changing
my squid configuration file.

Currently I have it set up using the httpd_accel_host and
httpd_accel_port
  # IP of server
  httpd_accel_host 172.16.7.199
  # Port
  httpd_accel_port 80 

After reading over these links, I believe that I need to comment out the
above lines and add something like:
  cache_peer 172.16.7.199 parent 80 0 no-query originserver name=server1
  cache_peer 172.16.10.36 parent 9000 0 no-query originserver
name=server2
  acl bin urlpath_regex ^/cgi-bin/
  cache_peer_access server2 allow bin
  cache_peer_access server1 deny bin

This should pass all requests coming through the squid to server1 unless
it has /cgi-bin/ in the URL.  Then it will be passed to server2 port
9000.

Now I don't want squid to keep a cached copy of the page returned by
either server1 or server2.  I need squid to always pass the request to
the correct server.  Will the above configuration do this, or do I need
to set another configuration flag?

Jake 
 
> -----Original Message-----
> From: Henrik Nordstrom [mailto:henrik@xxxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, June 12, 2007 6:21 PM
> To: Jacobson, Martin
> Cc: squid-users@xxxxxxxxxxxxxxx
> Subject: RE:  Redirecting to different server based
> onURLpattern
> 
> tis 2007-06-12 klockan 15:07 +0000 skrev Jacobson, Martin:
> 
> > Thanks for the pointer.  After reading the help wiki, I am still
> > confused on how cache_peer_access works.  Can someone provide a
simple
> > example?
> 
> It's a filter defining which requests MAY be sent to each peer. By
> default all peers is candidates.
> 
> Simple Examples:
> 
> http://wiki.squid-cache.org/SquidFaq/ReverseProxy#head-
> 7bd155a1a9919bda8ff10ca7d3831458866b72eb
> and
> http://wiki.squid-cache.org/SquidFaq/ReverseProxy#head-
> c073a2271a01dac8f222cff894d358707fd497ec
> 
> Regards
> Henrik


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux