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
23 # Allow from 127.0.0.1
26 # Please note that not restricting access to this location may reveal
27 # sensitive information.
30 ###############################################################################
32 ###############################################################################
34 # All the available directives are described below
39 # Syntax: ClamavMode local | daemon
40 # Default: ClamavMode local
41 # Context: server config, virtual host, directory
43 # If the module is supposed to use the clamav library directly,
44 # use local mode. In daemon mode, the module queries a remote clamd
45 # (on the same machine, of course) for virus checking.
46 # The connection to the daemon must be configured using the ClamavSocket
47 # or ClamavPort directives
52 # Syntax: ClamavSocket unix-domain-socket
54 # Context: server config, virtual host, directory
56 # Specifies the path where the Clamav daemon clamd is listening. If this
57 # directive is not set, the daemon mode of the module assumes
58 # a TCP connection to the Clamav daemon.
63 # Syntax: ClamavPort port
65 # Context: server config, virtual host, directory
67 # Specifies the port number on which the clamav daemon is listening.
68 # Not that this directive only has any effect if ClamavSocket is not specified.
73 # Syntax: ClamavTmpdir tmp-dir
74 # Default: ClamavTmpdir /tmp
75 # Context: server config, virtual host, directory
77 # This directive defines the directory where temporary files should be stored
78 # until the can be scanned for viruses.
83 # Syntax: ClamavDbdir virus-pattern-dir
84 # Default: same as that of your clamav installation
85 # Context: server config, virtual host, directory
87 # This directive defines the directory from which virus patterns are loaded.
90 # ClamavReloadInterval
92 # Syntax: ClamavReloadInterval interval
94 # Context: server config, virtual host, directory
96 # The pattern database is reloaded if the last request is more then interval
97 # seconds in the past. A value of 0 means that the pattern database is never
98 # reloaded, to update patterns, the server must be gracefully restarted.
99 # Reloading is only necessary in local mode, in daemon mode its the daemon's
100 # business to keep the pattern matching engine up-to-date.
103 # ClamavTrickleInterval
105 # Syntax: ClamavTrickleInterval interval
106 # Default: ClamavTrickleInterval 60
107 # Context: server config, virtual host, directory
109 # This directive sets the interval at which a block (normaly one byte, but
110 # configurable with the ClamavTrickleSize directive) of the incoming data
111 # is sent to the browser to keep it happy. If your browsers are tolerant of
112 # long delays, this value can be increased.
114 # Note that the trickle interval has a side effect that can affect your link
115 # load considerably: only when the trickle is sent to the client will the
116 # module be able to detect that the client has aborted the connection.
117 # A long trickle interval means that the server will continue downloading
118 # the file, although the client is no longer interested. This can fill up
119 # you link with downloads still going on no user is interested in.
121 # Browsers behave quite differently with respect to timeouts. For some
122 # browsers, a single byte is not good enough, so you will want to increase
123 # the trickle size to a larger value. Download speeds below 1 byte/sec seem
124 # to be a problem for browsers. Apple's Safari browser times out after
125 # 60 seconds (Mozilla seems to be more patient), so you will have do make
126 # the trickle interval smaller than 60. Note also that the trickle interval
127 # is a minimum value, if a packet arrives from the remote server after that
128 # interval, then a trickle block is sent to the browser client.
129 # If no packets arrive from the remote server, no trickle blocks are sent
135 # Syntax: ClamavTrickleSize size
136 # Default: ClamavTrickleSize 1
137 # Context: server config, virtual host, directory
139 # This directive sets the size of the block sent after each trickle interval.
140 # See the description of the ClamavTrickleInterval directive for details.
145 # Syntax: ClamavMaxfiles number-of-files
147 # Context: server config, virtual host, directory
149 # This directive sets the maxfiles limit variable in Clamav, please read the
150 # Clamav for the exact implications of this.
155 # Syntax: ClamavMaxfilesize filesize
157 # Context: server config, virtual host, directory
159 # This directive sets the maxfilesize limit variable in Clamav, please
160 # read the Clamav documentation for the exact implications of this.
165 # Syntax: ClamavRecursion depth
167 # Context: server config, virtual host, directory
169 # This directive sets the recursion depth limit variable in Clamav, please
170 # read the Clamav for the exact implications of this.
175 # Syntax: ClamavSafetypes safe-mime-type ...
177 # Context: server config, virtual host, directory
179 # Use this directive to specify a list of mime types that can safely be bypassed.
184 # Syntax: ClamavSize size
185 # Default: ClamavSizelimit 0
186 # Context: server config, virtual host, directory
188 # This directive sets the size of the largest part of a file that will be
189 # checked. By default, its value is 0, meaning the a file is scanned in its
190 # entirety. For a positive value, a chunk of at least size bytes
191 # is downloaded and checked for viruses. If nothing is found, the rest of
192 # the file is downloaded without checking.