|
[Date Prev]
[Date Next]
[Thread Prev]
[Thread Next] Re: cache on town hall
bburdick@media.org writes:
Ok, go ahead and HUP init. We have all the caches run with TZ=PDT just to keep things sort of consistent.
The cache doesn't do anything with redirects yet--it just passes them on. A few months ago I hacked up NCSA httpd-1.5 to read in a config file based on the AS database return an appropriate redirect message. I sent this message to Carl (I think): First cut at IP-based redirections. The patch below is against NCSA httpd 1.5a. On startup, httpd looks for a file named in $AS_TABLE. The format of this file is #IP addr IP Mask redirect-host # 127.0.0.1 255.255.255.255 jp.park.org 198.5.254.0 255.255.255.0 uk.park.org 10.0.0.0 255.0.0.0 au.park.org For simplicity the mask is specified now in dotted-decimal. This could be changed to something like 198.5.254.0/24 The envrionment variable $THIS_HOST should be set to the host's name or alias used in the 'redirect-host' column. So if the IP address/mask matches, and the redirect-host is equal to $THIS_HOST, then we don't give the redirect, we just process the request normally. The function which checks IP addresses currently uses a simple linked list. It will be too slow if the AS table has 40k entries. I'll rewrite the function to use hashes, or something else. Duane W.
|