2 # This file contains the default settings for c-icap
8 # Format: PidFile pid_file
10 # The file to store the pid of the main process of the c-icap server.
12 # PidFile /var/run/c-icap/c-icap.pid
13 PidFile /var/run/c-icap/c-icap.pid
16 # Format: CommandsSocket socket_file
18 # The path of file to use as control socket for c-icap
20 # CommandsSocket /var/run/c-icap/c-icap.ctl
21 CommandsSocket /var/run/c-icap/c-icap.ctl
24 # Format: Timeout seconds
26 # The time in seconds after which a connection without activity
32 # TAG: MaxKeepAliveRequests
33 # Format: MaxKeepAliveRequests number
35 # The maximum number of requests can be served by one connection
36 # Set it to -1 for no limit
38 # MaxKeepAliveRequests 100
39 MaxKeepAliveRequests 100
41 # TAG: KeepAliveTimeout
42 # Format: KeepAliveTimeout seconds
44 # The maximum time in seconds waiting for a new requests before a
45 # connection will be closed.
46 # If the value is set to -1, there is no timeout.
48 # KeepAliveTimeout 600
52 # Format: StartServers number
54 # The initial number of server processes. Each server process
55 # generates a number of threads, which serve the requests.
61 # Format: MaxServers number
63 # The maximum allowed number of server processes.
68 # TAG: MinSpareThreads
69 # Format: MinSpareThreads number
71 # If the number of the available threads is less than number,
72 # the c-icap server starts a new child.
77 # TAG: MaxSpareThreads
78 # Format: MaxSpareThreads number
80 # If the number of the available threads is more than number then
81 # the c-icap server kills a child.
86 # TAG: ThreadsPerChild
87 # Format: ThreadsPerChild number
89 # The number of threads per child process.
94 # TAG: MaxRequestsPerChild
95 # Format: MaxRequestsPerChild number
97 # The maximum number of requests that a child process can serve.
98 # After this number has been reached, process dies. The goal of this
99 # parameter is to minimize the risk of memory leaks and increase the
100 # stability of c-icap. It can be disabled by setting its value to 0.
102 # MaxRequestsPerChild 0
103 MaxRequestsPerChild 0
108 # The port number that the c-icap server uses to listen to requests.
114 # Format: User username
116 # The user owning c-icap's processes. By default, the owner is the
117 # user who runs the program.
125 # Format: Group groupname
127 # The group of users owning c-icap's processes, which, by default
128 # is the group of the current user.
136 # Format: ServerAdmin admin_mail
138 # The Administrator of this server. Used when displaying information
139 # about this server (logs, info service, etc)
142 ServerAdmin root@localhost
145 # Format: ServerName aServerName
147 # A name for this server. Used when displaying information about this
148 # server (logs, info service, etc)
156 # dir is the location of temporary files.
162 # Format: MaxMemObject bytes
164 # The maximum memory size in bytes taken by an object which
165 # is processed by c-icap . If the size of an object's body is
166 # larger than the maximum size a temporary file is used.
168 # MaxMemObject 131072
172 # Format: DebugLevel level
174 # The level of debugging information to be logged.
175 # The acceptable range of levels is between 0 and 10.
181 # Format: ModulesDir dir
183 # The location of modules
185 # ModulesDir /usr/lib/c_icap
186 ModulesDir /usr/lib/c_icap
189 # Format: ServicesDir dir
191 # The location of services
193 # ServicesDir /usr/lib/c_icap
194 ServicesDir /usr/lib/c_icap
197 # Format: TemplateDir dir
199 # The location of the text templates used by c-icap and its services,
200 # categorized by language and services/modules
204 TemplateDir /usr/share/c_icap/templates/
206 # TAG: TemplateDefaultLanguage
207 # Format: TemplateDefaultLanguage lang
209 # Sets the default language to use for text templates
211 # TemplateDefaultLanguage en
212 TemplateDefaultLanguage en
214 #TemplateReloadTime 360
215 #TemplateCacheSize 20
216 #TemplateMemBufSize 8192
219 # Format: LoadMagicFile path
221 # Load a c-icap magic file. A magic file contains various
222 # data type definitions. Look inside default c-icap.magic file
223 # for more informations.
224 # It can be used more than once to use multiple magic files.
226 # LoadMagicFile /usr/etc/c-icap.magic
227 LoadMagicFile /etc/c-icap/c-icap.magic
229 # TAG: RemoteProxyUsers
230 # Format: RemoteProxyUsers onoff
232 # Set it to on if you want to use username provided by the proxy server.
233 # This is the recomended way to use users in c-icap.
234 # If the RemoteProxyUsers is off and c-icap configured to use users or
235 # groups the internal authentication mechanism will be used.
237 # RemoteProxyUsers off
240 # TAG: RemoteProxyUserHeader
241 # Format: RemoteProxyUserHeader Header
243 # Used to specify the icap header used by the proxy server to send
244 # the authenticated client username to c-icap server
246 # RemoteProxyUserHeader X-Authenticated-User
247 RemoteProxyUserHeader X-Authenticated-User
249 # TAG: RemoteProxyUserHeaderEncoded
250 # Format: RemoteProxyUserHeaderEncoded onoff
252 # Set it to off if the RemoteProxyUserHeader is not base64 encoded
254 # RemoteProxyUserHeaderEncoded on
255 RemoteProxyUserHeaderEncoded on
258 # Format: AuthMethod Method Authenticator
260 # Used to define the internal authentication mechanism to use. This
261 # feature is not well tested and may cause problems. It is better to use
262 # RemoteProxyUser configuration.
263 # Method is the authentication method to use (basic, digest, etc).
264 # Currently only basic authentication method is implemented as build in
266 # Authenticator currently can only be "basic_simple_db"
267 # It can be considered as a user/password store and can be
268 # implemented as external module. The basic_simple_db is implemented as
273 # AuthMethod basic basic_simple_db
276 # Format: basic.Realm ARealm
278 # Specify the basic method realm
280 # basic.Realm "Basic authentication"
282 # basic.Realm "c-icap server authentication"
284 # TAG: basic_simple_db.UsersDB
285 # Format: basic_simple_db.UsersDB LookupTable
287 # Specify the lookup table where the usernames/passwords pairs
288 # are stored. The paswords must be unencrypted
289 # For more information about c-icap lookup tables read c-icap server
294 # basic_simple_db.UsersDB hash:/usr/local/c-icap/etc/c-icap-users.txt
296 # TAG: GroupSourceByGroup
297 # Format: GroupSourceByGroup LookupTable
299 # Defines a lookup table where the groups of users are stored indexed
300 # by group. It can be used more than once.
301 # For more information about c-icap lookup tables read c-icap server
306 # GroupSourceByGroup hash:/usr/local/c-icap/etc/c-icap-groups.txt
308 # TAG: GroupSourceByUser
309 # Format: GroupSourceByUser LookupTable
311 # Defines a lookup table where the groups of users are stored indexed
312 # by user. It can be used more than once.
313 # For more information about c-icap lookup tables read c-icap server
318 # GroupSourceByUser hash:/usr/local/c-icap/etc/c-icap-user-groups.txt
321 # Format: acl name type[{param}] value1 [value2] [...]
323 # Supported acl types are:
324 # acl aclname service service1 ...
326 # acl aclname type OPTIONS|RESPMOD|REQMOD ...
328 # acl aclname port port1 ...
329 # The icap server port
330 # acl aclname src ip1/netmask1 ...
331 # The client ip address
332 # acl aclname srvip ip1/netmask1 ...
333 # The c-icap server ip address
334 # acl aclname icap_header{HeaderName} value1 ...
335 # Matches the icap header HeaderName with value1 ...
336 # The values are in regex form: /avalue/
337 # acl aclname icap_resp_header{HeaderName} value1 ...
338 # The icap response header
339 # The values are in regex form: /avalue/
340 # acl aclname http_req_header{HeaderName} value1 ...
341 # The http request header
342 # The values are in regex form: /avalue/
343 # acl aclname http_resp_header{HeaderName} value1 ...
344 # The http response header
345 # The values are in regex form: /avalue/
346 # acl aclname data_type type1 ...
347 # The data type as recognized by the internal data type
348 # recognizer. The types are defined in c-icap.magic file
349 # acl aclname auth username|* ...
350 # The authenticated users. Using * instead of username means
352 # acl aclname group group1 ...
353 # if the user of request belongs to given groups
357 # acl OPTIONS type OPTIONS
358 # acl RESPMOD type RESPMOD
359 # acl REQMOD type REQMOD
360 # acl ALLREQUESTS type OPTIONS RESPMOD REQMOD
361 # acl XHEAD icap_header{X-Test} /value/
362 # acl ECHO service echo
363 # acl localnet src 192.168.1.0/255.255.255.0
364 # acl localhost src 127.0.0.1/255.255.255.255
365 # acl all src 0.0.0.0/0.0.0.0
368 # Format: icap_access allow|deny [!]acl1 ...
370 # Allowing or denying ICAP access based on defined access lists
374 # icap_access deny XHEAD
375 # #Allow OPTIONS method for all:
376 # icap_access allow localnet OPTIONS
377 # #Require authentication for all users from local network:
378 # icap_access allow AUTH localnet
379 # icap_access deny all
382 # Format: client_access allow|deny acl1 [acl2] [...]
384 # Allowing or denying connections on c-icap based on
385 # defined access lists. Only the acl types src, srvip and port
390 # client_access allow all
393 # Format: LogFormat Name Format
395 # Name is a name for this log format.
396 # Format is a string with embedded % format codes. % format codes
397 # has the following form:
398 # % [-] [width] [{argument}] formatcode
399 # if - is specified then the output is left aligned
400 # if width specified then the field is exactly width size
401 # some formatcodes support arguments given as {argument}
404 # %a: Remote IP-Address
405 # %la: Local IP Address
407 # %>a: Http Client IP Address. Only supported if the proxy
408 # client supports the "X-Client-IP" header
409 # %<A: Http Server IP Address. Only supported if the proxy
410 # client supports the "X-Server-IP" header
411 # %ts: Seconds since epoch
412 # %tl: Local time. Supports optional strftime format argument
413 # %tg: GMT time. Supports optional strftime format argument
414 # %>ho: Modified Http request header. Supports header name
415 # as argument. If no argument given the first line returned
416 # %huo: Modified Http request url
417 # %<ho: Modified Http reply header. Supports header name
418 # as argument. If no argument given the first line returned
419 # %iu: Icap request url
421 # %is: Icap status code
422 # %>ih: Icap request header. Supports header name
423 # as argument. If no argument given the first line returned
424 # %<ih: Icap response header. Supports header name
425 # as argument. If no argument given the first line returned
426 # %Ih: Http bytes received
427 # %Oh: Http bytes sent
428 # %Ib: Http body bytes received
429 # %Ob: Http body bytes sent
432 # %bph: The first 5 bytes of the body preview data. Non
433 # printable characters printed in hex form.
434 # Supports the number of bytes to output as argument.
439 # LogFormat myFormat "%tl, %a %im %iu %is %I %O %Ib %Ob %{10}bph"
442 # Format: ServerLog LogFile
444 # the file used by the build-in logger file_logger to
445 # store debugging information, errors and other
446 # information about the c-icap server.
448 # ServerLog /usr/var/log/server.log
449 ServerLog /var/log/c-icap/server.log
452 # Format: AccessLog LogFile [LogFormat] [[!]acl1] [[!]acl2] [...]
454 # LogFile is a file where to log access information.
455 # LogFormat is the log format to use. If ommited c-icap uses:
456 # "%tl, %la %a %im %iu %is"
457 # Also acls can be used to select certain requests to be logged.
458 # This directive can be used more than once to specify more than
459 # one access log files
461 # AccessLog /usr/var/log/access.log
463 # AccessLog /usr/var/log/access.log MyFormat all
464 AccessLog /var/log/c-icap/access.log
467 # Format: Logger LoggerName
469 # Specify wich logger to use. By default uses the build in "file_logger" which
470 # uses files for access and server logging.
477 # Format: Module Type ModuleFile
479 # Load an external module/plugin to c-icap.
480 # ModuleFile is the filename of the module. If no full path given then c-icap
481 # searche in path defined by the ModulesDir configuration parameter.
482 # Type is the type of the external module and can be one of the following:
483 # - "logger" for modules implement a logger
484 # - "common" for general purpose modules
488 # Module logger sys_logger.so
491 # Format: Service aName ServiceFile
493 # It loads the service ServiceFile. The argument aName used
494 # as alias name for the service
498 # Service echo_service srv_echo.so
501 # Format: ServiceAlias AliasName ServiceName[?param1=value1¶m2=value2...]
503 # Used to define an alias name for a service.
507 # ServiceAlias avscan srv_clamav?allow204=on&sizelimit=off&mode=simple
511 # TAG: General configuration parameters for all services
513 # PreviewSize: The preview data size to advertise to the icap client
514 # MaxConnections: The client should not use more than MaxConnections
516 # TransferPreview: The list of file extensions, seperated by commas,
517 # for which the client should send preview data.
518 # TransferIgnore: The list of file extensions that should not be sent
520 # TransferComplete: The list of file extensions that should be sent
521 # in their entirety, without preview, to the icap server
523 # echo.PreviewSize 512
524 # echo.TransferIgnore gif, jpeg
527 ######################################################
528 # External modules comming with core c-icap server
532 # Simple test service
534 # Service echo srv_echo.so
535 #Service echo srv_echo.so
539 # Add support for logging access and server events to syslog server
540 # Use "Module" configuration parameter to load this module and "Logger"
541 # to make it default logger for the c-icap.
543 # Module logger sys_logger.so
547 # TAG: sys_logger.Prefix
548 # Format: sys_logger.Prefix string
550 # string is be presented in every syslog message.
552 # sys_logger.Prefix "C-ICAP:"
554 # TAG: sys_logger.Facility
555 # Format: sys_logger.Facility daemon|user|local1|local2|local3|local4|local5|local6|local7
557 # specifies the facility type of syslog.
559 # sys_logger.Facility daemon
561 # TAG: sys_logger.access_priority
562 # Format: sys_logger.access_priority alert|crit|debug|emerg|err|info|notice|warning
564 # determines the importance of the access log message
566 # sys_logger.access_priority info
568 # TAG: sys_logger.server_priority
569 # Format: sys_logger.server_priority alert|crit|debug|emerg|err|info|notice|warning
571 # determines the importance of the server log message
573 # sys_logger.server_priority crit
575 # TAG: sys_logger.LogFormat
576 # Format: sys_logger.LogFormat LOGFORMAT
578 # The log format to use. If no log format defined then
579 # the following will be used:
580 # "%la %a %im %iu %is"
584 # Logformat BasicFormat "%la %a %im %iu %is"
585 # sys_logger.LogFormat BasicFormat
587 # TAG: sys_logger.access
588 # Format: sys_logger.access [!]acl1 ...
590 # Allow selecting ICAP requests to be logged using acls.
591 # By default all requests will be logged.
595 # sys_logger.access all
597 # End module: sys_logger
601 # Add support for Berkeley DB based lookup tables. The format for
602 # bdb path of the lookup table is:
604 # Use the c-icap-mkbdb utility to build Berkeley DB c-icap lookup tables
606 # Module common bdb_tables.so
608 # End module: bdb_tables
610 # Module: dnsbl_tables
612 # Add support for dns lookup tables. Can be used to access
613 # dns block lists. The dnsbl lookup table path definition is:
615 # For example the lookup table for accessing the black.uribl.com
617 # dnsbl:black.uribl.com
619 # Module common dnsbl_tables.so
621 # End module: dnsbl_tables
623 # Module: ldap_module
625 # Add LDAP support to c-icap. The user can use LDAP based lookup tables
626 # using the following lookup table path:
627 # ldap://[username:password@]ldapserver?base?attr1,attr2?filter
628 # The filter can contain the "%s" formating code which will be replaced by
630 # Examples of supported ldap urls:
631 # ldap://ldap.chtsanti.net?o=chtsanti?cn,uid?uid=%s
632 # ldap://cn=Directory Manager:Apassword@ldap.chtsanti.net?o=chtsanti?mermberUid?(&(objectClass=posixGroup)(cn=%s))
634 # WARNING: is not enough tested it may contain bugs!
636 # Module common ldap_module.so
638 # End module: ldap_module