home *** CD-ROM | disk | FTP | other *** search
- # Main Smart Cache Config File
- #
- # SEE ALSO
- # gc.cnf - Smart Cache garbage collector config file
- # fail.cnf - Blocked URL list
- # pass.cnf - Allowed URL list
- # cookies.cnf - Cookies filter set-up
- #
- # (C) Radim Kolar 1998-2000 (hsn@cybermail.net)
- # http://home.worldonline.cz/~cz210552/
- #
- # Smart Cache is Open Source Software.
- # http://www.opensource.org/
- #
-
- # lines starting with # are comments (how strange..)
- #
- # As you can see, this product is _VERY_ configurable. So enjoy with it. Rule
- # of thumb: If you don't understand what you are doing, don't change it.
- #
- # Also make a look at gc.cnf, which configures garbage collector.
- #
- # YOU MUST RUN garbage collector BY HAND, Smart Cache didn't invoke it
- # when cache size is reached, because this can be very lengthy
- # (one hour on my 386/40) process on large (200MB+) caches. So it's
- # recommended to run GC in nights via scheduler (for example cron).
-
-
- #URL link for use in generated error messages. Used for
- # ever moving location of Smart Cache homepage, but feel free to set
- # it to your favourite page (for example to Hobbes Archive).
- visible_link http://home.worldonline.cz/~cz210552/
-
- #hostname for use in error reports
- #This names has nothing to do with your IP address, real hostname or
- #something. This is just some text, which can be displayed in error
- #messages.
- visible_hostname smart.cache
-
- #TCP port for this cache.
- # 8080 is old known proxy port, introduced by CERN httpd.
- # Some servers uses port 80, but because port 80 is used by standard
- # WWW service, you can not run web server and Smart Cache on the
- # same port. I use 8080 because it easy to remember.
- # Squid uses port 3128, so you can run both caches (Squid and SC).
- # You can not run more than ONE program on the same port!
- port 8080
-
- #IP address for binding socket, if entered * all local addresses are binded
- #
- #Note: Others computers can not connect to it when 127.0.0.1 is used, this
- # is very good for enhanced security. If you have intranet and want allow other
- # computers in intranet (but not from Internet) to use this proxy, enter your
- # intranet address here. Using * allows all computers (even from Internet) to
- # use this proxy, so setting some Fail directives to block your private data
- # may be wise. There are no known security holes.
- BindAddress 127.0.0.1
-
- # *** storage setup ***
- #directory for storing cached objects. Use the shortest path possible
- #and don't end directory name with \ or /
- #DO NOT USE ROOT directory!!! (for example c:\)
- CacheRoot C:\scache
-
- #default filename for directory index. Unix people doesn't like
- # ".welcome" standard because ls don't displays them. Some people
- # likes index.html or something. Smart Cache avoids local filename
- # clashes, so fee free to set it to any useful name.
- DefaultName dirindex.html
-
- #URL directory CRC32 hashing, used for performance improvement
- #if you don't like dirs - don't set dirs to ZERO! use 1 instead.
- #
- # 4x4 is good for 100-150MB cache, for bigger cache size, set bigger
- # values.
- swap_level1_dirs 4
- swap_level2_dirs 4
- #NOTE: if you change swap_level_dirs values, you MUST reorder cache directory
- #by running Smart Cache with -rebalance command line option!
-
- #parent proxy (if any). PORT NUMBER IS REQUIRED!
- #A parent proxy login and password may be specified in the "http_proxy"
- #configuration statement after the parent proxy port in a form login:password.
- # Example:
- # http_proxy my.cache.net 3128 mylogin:mypass
- #using IP address instead of DNS name is strongly recommended (workaround
- # for JVM DNS caching "feature", see main documentation for more info )
- #
- #parent proxy is ALSO required if you need support
- #for other protocols than HTTP (FTP, Gopher, ...). Parent proxy
- #must know how to support these protocols.
- #NOTE: Gatewaying of HTTPS/SSL via http_proxy is NOT supported.
- #
- #http_proxy 1.2.3.4 3128
-
- #don't use parent proxy for this servers/domains. Wildcards ARE NOT ALLOWED!
- # string netmag.cz will act like *netmag.cz
- #no_proxy localhost
-
- #file descriptor limit by your OS will still apply, so don't expect that if
- #you set it to 2000, that 2000 users will be able to connect to this proxy.
- #Smart Cache use 3 file descriptors per one client, Squid uses 2-3 descriptors
- #per one client (2 when sending data from memory-cache).
- max_clients 30
-
- # The AllowCONNECT directive specifies a list of port numbers to which
- # the proxy CONNECT method may connect. Today's browsers use this method
- # when a https connection is requested and proxy tunneling over http is
- # in effect.
- # By default, only the default https port (443) and the default snews
- # port (563) are enabled. Use the AllowCONNECT directive to override
- # this default and allow connections to the listed ports only.
-
- # If you want to disable CONNECT, comment next line.
-
- allowconnect 443 563
-
- # Proxy access control
- #
- # Proxy access may be limited by using "allow" configuration statement
- # with the host ip address as a parameter to grant access only to
- # specified hosts. Hosts that are not allowed to access proxy server
- # will receive "403 Cache access denied" response. If no "allow"
- # statements are found then any host is allowed to access the proxy.
- #
- # Example:
- # allow proxy access only from computer it is running at and from addresses
- # 192.168.1.2 and 192.168.1.3
- #
- # allow 127.0.0.1
- # allow 192.168.1.2
- # allow 192.168.1.3
-
- #if you want to use this proxy as forwarder, enter it your primary
- #forwarding hostname (NOT URL!), which will be used if browser
- #do not supply Host: HTTP header.
- #If you are running transparent proxy, set it to host, where is
- #message ,,Your browser do not send Host: header, so you can not use
- #our network, because we has here transparent proxy set. Upgrade your
- #browser at least to Netscape 2.0''
- default_forward_for localhost
-
- # ####################
- # Control Flag Files
- # ####################
- #
- #flag file for clean cache shutdown
- #if this file exists cache will be stopped, without interrupting any
- #active transfers. Flag is checked every 3 minutes.
- #NOTE: If you are browsing off-line, simply press CTRL-C :) or
- #kill the task.
-
- Shutdown_flag C:\stop
-
- #flag file for immediate cache shutdown
- #if this file exists cache will be always stopped even if there are some
- #active transfers. Smart Cache will try to sync .cacheinfo before
- #exiting, so this is cleaner way to shutdown than killing the task.
-
- Immediate_shutdown_flag C:\stop.now
-
- #How often Smart Cache checks for `immediate_shutdown_flag` ?
- # time is in seconds
- flag_check_interval 20
-
- # Should be flag files cleared when Smart Cache starts?
- clear_flags_on_start 1
-
- # ###################
- # Log files
- # ###################
- #
- # Log Hit/miss/block statistics
- # stat_log <filename>
-
- #logging setup for common type of logs. You can have more than
- #one logfile of the same type.
- #Logs are masked (good for forwarder running multiple servers).
- #
- #access_log <URL mask> <file-name>
- #Example:
- #accesses to netmag.cz are loged to separate file, all other to cache.log
- #access_log http://netmag.cz/* netmag.access.log
- #access_log * cache.log
-
- #Same thing goes here for other types of logs
- #referer_log * referer.log
- #agent_log * agent.log
-
- # ################
- # T i m e O u t s
- # ################
- #
- #timeouts in sec,
- # input = reading request from client browser
- # proxyreadtimeout = reading response from remote server. This should
- # be less than 6 minutes (2*SAVETIMER value in mgr.java)
- Inputtimeout 20
- proxyreadtimeout 210
-
- # Smart Cache allows control over the files to be cached in two ways:
- #
- # First, you can specify a set of URLs which must never be cached,
- # in which case all other URLs are candidates for caching. This uses
- # the NoCaching directive to specify what URLs must never be cached.
- #
- # In the second scheme, you can explicitly list all the URLs which
- # will be considered for caching; URLs not in that list will never
- # be cached. This uses the CacheOnly directive
- #
- # Defaults: neither NoCaching nor CacheOnly are given
- #
- # **** WARNING: YOU CAN NOT USE BOTH !!! ****
- #
- # Syntax: CacheOnly <URL pattern>
- # NoCaching <URL pattern>
- #
- # Examples:
- #
- # CacheOnly http://www.ibm.com/*
- # NoCaching http://never.cache.me.net/*
-
- #NoCaching http://localhost/*
- #CacheOnly http://cache.me.net/*
-
- ###################
- ## refresh rate ##
- ###################
- # default_refresh_pattern Reload_age Min_age Lastmod_factor max_age Expire_age Redirect_Age
- #
- # All times (except Lastmod_factor) are float numbers in minutes
- #
- #reload_age: if user wants reload but, object is younger than reload_age, old
- #copy is returned and reload request is ignored.
- #
- #min_age: all cacheable objects are considered fresh for XX minutes.
- # but reload (if allowed) can be used for their refresh
- #expire_age: If object has expire time and this time > Expire_age, expire
- # is honored, otherwise it is ignored.
- #redirect_Age:
- # temporary redirect is valid only for XX minutes.
- #
- #
- # lastmod_factor:
- #
- # AGE is how much the object has aged *since* it was retrieved:
- #
- # AGE = NOW - OBJECT_DATE
- #
- # LM_AGE is how old the object was *when* it was retrieved:
- #
- # LM_AGE = OBJECT_DATE - LAST_MODIFIED_TIME
- #
- # LM_FACTOR is the ratio of AGE to LM_AGE:
- #
- # LM_FACTOR = AGE / LM_AGE
- #
- # Max_age: if object is older than XX minutes, cache will reload it.
- # setting first number to non-zero value, makes auto-reload pages
- # out of work, so set refresh_pattern for them.
- # all numbers can be floating point
- default_refresh_pattern 0.1 60 0.20 10080 10 0.5
-
- #Specific refresh patters for some URLs
- #refresh_pattern http://technet.cz/* 0 60 0.30 10080
-
- # ###############################################
- # Smart Cache special features. Have fun with it.
- # ###############################################
- #
- # @1
- #pragma:no cache handling, what to do with non-cacheable documents?
- #expires < now is the same as pragma: no-cache
- # 0 - standard setting, be nice - don't cache any uncacheable objects
- # 1 - cache all uncacheable documents
- # 2 - cache only uncacheable images (probably only adv and counters)
- # 3 - don't cache uncacheable text objects, but all others do
- # 4 - don't cache uncacheable redirects, but all others do
- #
- #Hint: if this cache use multiple users, using mode 1 may cause some troubles,
- # but 2 or 3 are safe. (3 is better than 2)
- #If you have troubles with redirects try 4
-
- pragma_no_cache 1
-
- # @2
- #Keep deleted objects in cache (and send it to users) even if the
- #original page has been deleted (rc=404). Very useful.
- # 0=no, 1=yes
- keep_deleted 1
-
- # @3
- #Generate Last-Modified header if object is cacheable and this header
- #doesn't exist. It helps HTTP-Clients make IMS Requests against your cache.
- #This is also good idea when running as forwarder.
- # 0 -don't generate
- # 1 - generate when sending objects from cache
- # 2 - generate always (not recommended due to bugs in browsers)
- # Netscape is known to be buggy. Latest version tested is 4.5, which is
- # still broken.
- generate_lastmod 1
-
- # @4
- #Hide remote servers errors. If remote server returns some kind of error,
- #when we try to refresh page, return old page from cache.
- #This may helps to clean server busy messages and load_failed messages
- #from parent proxy. Return codes considered as errors are RC=400, 403 and 500+
- hide_errors 1
-
- # @5
- #Customized error messages. If used we will send redirect to specified URL.
- #only rc=403 (Forbidden) and rc=500 (Load failed) are now supported.
- #
- # The best is to use '0' for displaying 1x1 empty GIF with transparent
- # background.
- #RECOMMENDED: Or send 1x1 Blank gif image, faster than using redirect.
- #ErrorDocument 403 0
- #
- # There is also alternative to send 206 Return code (No content)
- # instead if '-' is used (see examples), but not in Netscape (if got image
- # without size specified in HTML, it does not render anything on page.
- #ErrorDocument 403 -
- #
- #Other possibility is send empty HTML document instead.
- #ErrorDocument 403 !
- #
- #Or what about to Redirect to some interesting GIF ?
- #ErrorDocument 403 http://some.site.with.nice.images.com/images/nature/bluesky.gif
-
- # @6
- #Remove Pragma: no-cache from clients requests. When sending
- #user's request to HTTP server (or HTTP proxy), remove this request line.
- #Some servers has workaround for some browsers bug and when receive
- #If-Modified-Since request with Pragma:no-cache, sends whole object
- #instead of 304 reply. Modern browsers don't have this bug, but servers
- #unfortunately doesn't recognize buggy and non-buggy browsers.
- #
- # Description of bug from Apache 0.8.5 documentation
- # *) Work around bogus behavior when reloading from Netscape.
- # It's Netscape's bug --- for some reason they expect a request with
- # If-modified-since: to not function as a conditional GET if it also
- # comes with Pragma: no-cache, which is way out of line with the HTTP
- # spec (according to Roy Fielding, the redactor).
- #
- #If you are using parent proxy, you will not be able to force it
- #to refresh page.
- #
- #Hint: If you are NOT using parent proxy and don't have
- #historic browser (Netscape 2+ is OK), USE it.
- remove_pragma_no_cache 0
-
- # @7
- # What to do with Referer header ?
- # Referer header contains last visited URL. This allows webmasters
- # to track your browsing path. If you want to protect your privacy
- # set this to 3, which is the safest choice. When used, Smart Cache
- # will send totally useless information for webmaster, but enough
- # to fool any referer checks scripts.
- #
- # 0 - nothing, do not touch this!
- # 1 - remove it. Some applications (like counters) may stop working.
- # 2 - make is the same as requested URL
- # 3 - same as 2, but change it even after remaping by Redirect. Safest choice
- # to protect your privacy.
- #
- # Warning: Some applications with heavy depending on referer header, may stop working.
- referer_hack 0
-
- # @8
- # What about to send fake Referer header ?
- # You can send anything. If used, option referer_hack will be ignored.
- #
- #fake_referer http://i.fall.down.from.spiritual.world/
-
- # @9
- # What about to send fake user-agent (Browser id)?
- # It you want to hide what browser and version are you using, this is for you.
- # Or you can make WWW logs somewhat more interesting...
- # fake_user_agent <String>
- #
-
- #Tell server that we are using Netscape/3 under Linux
- #fake_user_agent Mozilla/3.0 (X11; U; Linux 1.2.13 i386)
- #or tell him anything other
- #fake_user_agent Lord Vishnu/Transcendental (Vaikuntha;Supreme Personality of Godness)
-
- #Should be "via Smart Cache 0.XX" appended to your browser identification?
- #This confuses PHP-generated pages, PHP will generate slightly more
- #HTML conservative pages.
- #If yes webmasters will see that you are using Smart Cache.
- #If you are using fake_user_agent this option will simply do nothing.
-
- append_via 1
-
- # @10
- # What about to make 'referer.log' more useful and compact?
- # full_referer_log <0/1>
- #
- # 1 - all referers are logged
- # 0 - referers must be from different servers to be logged.
- # Very good for recording your path in cyberspace.
- #
-
- full_referer_log 0
-
- # @11
- # Smart Cache can cache password-protected documents. Of course, this opens
- # a security hole, because once password-protected document gets cached,
- # it can be received from proxy without knowing password.
-
- # 0 - no, 1 - yes
- cache_password_protected 0
-
- # @12
- # Are URL tests case sensitive? (see gc.cnf for example)
- # case sensitive matching is much faster. Use it if you have a lot of
- # URLs (about 200)
- # 1 - yes, 0 - no.
- #
- case_sensitive_matching 0
-
- # @13
- # OUTGOING C00kies filter
- # Cookies block list is loaded from external file and reloaded when
- # changed.
- #
- allow_cookies_to_file cookies.cnf
-
- # @14
- # You can also send fake cookies. When sending cookies out is not permitted
- # cookie will be replaced by fake_cookie instead of deleting.
- #
- # format is name=value [ ; name=value ; ....]
- # value can not contains spaces -> use underscores '_' instead.
- # Smart Cache don't tests wafer for validity, just sends it out.
- # RFC says that cookies must be shorter than 4k, but Smart Cache sends out
- # String of any size, which is good for buffer overflow attacking on remote
- # sites.
- #
- #fake_cookie NOTICE=HEY_GUYS!_DON'T_SEND_ME_YOUR_JUNK!
-
- # @15
- # URL Filter
- #
- # Smart Cache allows to set-up URL filter. This filter is controlled by
- # two keywords.
- # First is Pass <URL pattern>. This marks URLs, which are always allowed
- # even if Fail disables them.
- # Second is Fail <URL pattern> which marks not allowed URLs.
- #
- # Smart Cache has support only for '*' wildcard. You can use it in pattern
- # more times.
- #
- # You can also use external files for blocking URLs. These files can
- # be automagicaly reloaded when changed which eliminates need of restarting
- # Smart Cache as in case of hardcoded Fail or Pass directives in scache.cnf
- #
- # NOTE: If you are using these files, don't put any Fail/Pass directives into
- # main Smart Cache config. If you do, it will be deleted (ignored)
- # when Smart Cache reloads changed block files.
- Fail_file fail.cnf
- Pass_file pass.cnf
-
- # Announce blocked URLs to console
- #
- # This is useful if you are using a complex "fail.cnf" with
- # a lot of entries and can't fiddle out if or why some request has
- # been blocked.
- fail_trace 0
-
- # @16
- # Redirecting specified URLs to another
- # some redirect use examples. Smart Cache do not sends redirect to browser,
- # it remaps request internally and continue with it. This allows to use SC
- # as web forwarder (accelerator).
- # When '*' is used in redirect it must be the last character in pattern!
- # 1>
- #this redirect http://www.netmag.home.cz/sample.html to
- # http://netmag.cz/sample.html
- #Redirect http://www.netmag.home.cz/* http://netmag.cz/*
-
- # 2>
- #this redirect http://ncic.netmag.home.cz/sample.html to
- # http://ncic.netmag.cz/
- #Redirect http://ncic.netmag.home.cz/* http://ncic.netmag.cz/
-
- #defining alias for webcrawler
- #Redirect http://www.webcrawler.com/* http://webcrawler.com/*
-
- # @17 Quick Abort Feature
- # what to do with aborted requests?
- #
- # values min_kbytes, percent, max-kbytes
- # When request is aborted by client, SmartCache may continue download
- # the requested file into cache. Downloading is continued if
- # * file size is known in the time, when request starts
- # and
- # * need to download < min_kbytes
- # or
- # * > percent file is transfered and need to download < max_kbytes
- #
- # if min_kbytes set to -1 for quick abort is disabled
- # (always continue with downloads).
- #
-
- #enable quick abort
- #quick_abort 20 0.5 100
-
- #default is continue to download Aborted objects (disabled)
- quick_abort -1 0.5 100
-
- # if quick_abort is *disabled*, all transfers will be continued.
- # Because you may download by mistake a very large unwanted file, I
- # implemented timeout for this type of downloads.
- # Timeout time is in minutes. If quick abort is not disabled, this value
- # has no meaning.
-
- #default is abort download of Aborted objects after 3 minutes.
- max_aborted_transfer_time 3
-
- # @18
- # Data compression support
- #
- # Smart Cache can store text data in gzip format. This saves diskspace.
- # Data stored in Cache are sent to your browser in gzipped form, so your
- # browser must know how to handle them or use auto_decompress.
- auto_compress 0
- #If your browser can not handle compressed data, Smart Cache can uncompress it.
- auto_decompress 0
-