1 LoadModule clamav_module lib/apache/mod_clamav.so
4 # Here is a configuration for an Apache proxy that scans everything except some
5 # image types for viruses, using the database files in /var/lib/clamav
6 # While downloading files, mod_clamav will write a copy of the file it will later
7 # scan for viruses in /tmp/clamav.
9 # ClamavTmpdir /tmp/clamav
10 # ClamavDbdir /var/lib/clamav
11 # ClamavSafetypes image/gif image/jpeg image/png
14 # SetOutputFilter CLAMAV
17 # The status page can be enabled with the Location
25 # Please note that not restricting access to this location may reveal
26 # sensitive information.
29 ###############################################################################
31 ###############################################################################
33 # All the available directives are described below
38 # Syntax: ClamavMode local | daemon
39 # Default: ClamavMode local
40 # Context: server config, virtual host, directory
42 # If the module is supposed to use the clamav library directly,
43 # use local mode. In daemon mode, the module queries a remote clamd
44 # (on the same machine, of course) for virus checking.
45 # The connection to the daemon must be configured using the ClamavSocket
46 # or ClamavPort directives
51 # Syntax: ClamavSocket unix-domain-socket
53 # Context: server config, virtual host, directory
55 # Specifies the path where the Clamav daemon clamd is listening. If this
56 # directive is not set, the daemon mode of the module assumes
57 # a TCP connection to the Clamav daemon.
62 # Syntax: ClamavPort port
64 # Context: server config, virtual host, directory
66 # Specifies the port number on which the clamav daemon is listening.
67 # Not that this directive only has any effect if ClamavSocket is not specified.
72 # Syntax: ClamavTmpdir tmp-dir
73 # Default: ClamavTmpdir /tmp
74 # Context: server config, virtual host, directory
76 # This directive defines the directory where temporary files should be stored
77 # until the can be scanned for viruses.
82 # Syntax: ClamavDbdir virus-pattern-dir
83 # Default: same as that of your clamav installation
84 # Context: server config, virtual host, directory
86 # This directive defines the directory from which virus patterns are loaded.
89 # ClamavReloadInterval
91 # Syntax: ClamavReloadInterval interval
93 # Context: server config, virtual host, directory
95 # The pattern database is reloaded if the last request is more then interval
96 # seconds in the past. A value of 0 means that the pattern database is never
97 # reloaded, to update patterns, the server must be gracefully restarted.
98 # Reloading is only necessary in local mode, in daemon mode its the daemon's
99 # business to keep the pattern matching engine up-to-date.
102 # ClamavTrickleInterval
104 # Syntax: ClamavTrickleInterval interval
105 # Default: ClamavTrickleInterval 60
106 # Context: server config, virtual host, directory
108 # This directive sets the interval at which a block (normaly one byte, but
109 # configurable with the ClamavTrickleSize directive) of the incoming data
110 # is sent to the browser to keep it happy. If your browsers are tolerant of
111 # long delays, this value can be increased.
113 # Note that the trickle interval has a side effect that can affect your link
114 # load considerably: only when the trickle is sent to the client will the
115 # module be able to detect that the client has aborted the connection.
116 # A long trickle interval means that the server will continue downloading
117 # the file, although the client is no longer interested. This can fill up
118 # you link with downloads still going on no user is interested in.
120 # Browsers behave quite differently with respect to timeouts. For some
121 # browsers, a single byte is not good enough, so you will want to increase
122 # the trickle size to a larger value. Download speeds below 1 byte/sec seem
123 # to be a problem for browsers. Apple's Safari browser times out after
124 # 60 seconds (Mozilla seems to be more patient), so you will have do make
125 # the trickle interval smaller than 60. Note also that the trickle interval
126 # is a minimum value, if a packet arrives from the remote server after that
127 # interval, then a trickle block is sent to the browser client.
128 # If no packets arrive from the remote server, no trickle blocks are sent
134 # Syntax: ClamavTrickleSize size
135 # Default: ClamavTrickleSize 1
136 # Context: server config, virtual host, directory
138 # This directive sets the size of the block sent after each trickle interval.
139 # See the description of the ClamavTrickleInterval directive for details.
144 # Syntax: ClamavMaxfiles number-of-files
146 # Context: server config, virtual host, directory
148 # This directive sets the maxfiles limit variable in Clamav, please read the
149 # Clamav for the exact implications of this.
154 # Syntax: ClamavMaxfilesize filesize
156 # Context: server config, virtual host, directory
158 # This directive sets the maxfilesize limit variable in Clamav, please
159 # read the Clamav documentation for the exact implications of this.
164 # Syntax: ClamavRecursion depth
166 # Context: server config, virtual host, directory
168 # This directive sets the recursion depth limit variable in Clamav, please
169 # read the Clamav for the exact implications of this.
174 # Syntax: ClamavSafetypes safe-mime-type ...
176 # Context: server config, virtual host, directory
178 # Use this directive to specify a list of mime types that can safely be bypassed.
183 # Syntax: ClamavSize size
184 # Default: ClamavSizelimit 0
185 # Context: server config, virtual host, directory
187 # This directive sets the size of the largest part of a file that will be
188 # checked. By default, its value is 0, meaning the a file is scanned in its
189 # entirety. For a positive value, a chunk of at least size bytes
190 # is downloaded and checked for viruses. If nothing is found, the rest of
191 # the file is downloaded without checking.
193 # vim: filetype=apache ts=4 sw=4 et