-
Notifications
You must be signed in to change notification settings - Fork 0
/
apt-cacher.conf
278 lines (240 loc) · 12.7 KB
/
apt-cacher.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
#################################################################################
# This is the config file for apt-cacher. On most Debian systems you can safely #
# leave the defaults alone. #
# #
# Commented defaults or examples are given. They can be changed here, or #
# overridden using a fragment placed in ./conf.d/ #
#################################################################################
### GENERAL ###
# The location of the local cache/working directory. This can become quite
# large, so make sure it is somewhere with plenty of space.
#
#cache_dir = /var/cache/apt-cacher
# The directory to use for apt-cacher access and error logs.
# The access log records every request in the format:
#
# date-time|PID|client IP address|HIT/HEAD/MISS/EXPIRED/NOTMOD|object size|object name
#
# The error log is slightly more free-form, and is also used for debug messages
# if debug mode is turned on.
#
#log_dir = /var/log/apt-cacher
# The email address of the administrator is displayed in the info page and
# traffic reports.
#
#admin_email = root@localhost
# Daemon port setting, only useful in stand-alone mode. You need to run the
# daemon as root to use privileged ports (<1024).
#
# For standalone daemon auto startup settings please edit the file
# /etc/default/apt-cacher.
#
#daemon_port = 3142
# Optional settings, user and group to run the daemon as. Make sure they have
# sufficient permissions within the cache and log directories. Comment the
# settings to run apt-cacher as the invoking user.
#
group = www-data
user = www-data
# optional setting, binds the listening daemon to specified IP(s).
#
#daemon_addr = localhost
# Apt-cacher can be used in offline mode which just uses files already cached,
# but doesn't make any new outgoing connections by setting this to 1.
#
#offline_mode = 1
# To enable data checksumming, install libberkeleydb-perl and set this option to
# 1. Then wait until the Packages/Sources files have been refreshed once (and so
# the database has been built up). You can also delete them from the cache to
# trigger the database update.
#
#checksum = 1
# Importing checksums from new index files into the checksum database can cause
# high CPU usage on slower systems. This option sets a limit to the number of
# index files that are imported simultaneously, thereby limiting CPU load
# average, but, possibly, taking longer. Set to 0 for no limit.
#
#concurrent_import_limit = 1
# CGI mode is deprecated.
#
# Send a 410 (Gone) HTTP message with the specified text when accessed via
# CGI. Useful to tell users to adapt their sources.list files when the
# apt-cacher server is being relocated (via apt-get's error messages while
# running "update")
#
#cgi_advise_to_use = Please use http://cacheserver:3142/ as apt-cacher access URL
#cgi_advise_to_use = Server relocated. To change sources.list, run
# perl -pe "s,/apt-cacher??,:3142," -i /etc/apt/sources.list
#
# To further facilitate migration from CGI to daemon mode this setting will
# automatically redirect incoming CGI requests to the specified daemon URL.
#
#cgi_redirect = http://localhost:3142/
### UPSTREAM PROXY ###
# Apt-cacher can pass all its requests to an external HTTP proxy like Squid,
# which could be very useful if you are using an ISP that blocks port 80 and
# requires all web traffic to go through its proxy. The format is
# 'http://[user[:password]@]hostname:port', eg: 'http://proxy.example.com:8080'.
#
#http_proxy = proxy.example.com:8080
# This sets the interface to use for the upstream connection.
# Specify an interface name, an IP address or a host name.
# If unset, the default route is used.
#
#interface = eth0
# Rate limiting sets the maximum bandwidth in bytes per second to use for
# fetching packages. Use 0 value for no rate limiting.
#
#limit = 0
### ACCESS and SECURITY ###
# Server mapping - this allows mapping virtual paths that appear in the access
# URL to real server names. The syntax is the part of the beginning of the URL
# to replace (the key), followed by a list of mirror URLs, all space
# separated. Multiple mappings are separated by semicolons or commas, as
# usual. Note that you need to specify all keys (or use the '%PATH_MAP%'
# shorthand) in the allowed_locations option, if you make use of it. Also note
# that the paths should not overlap each other.
#
# The keys are also used to separate the caching of multiple distributions
# within a single apt-cacher instance if distinct_namespaces is also set.
#
#path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ;
# ubuntu archive.ubuntu.com/ubuntu ;
# security security.debian.org/debian-security ftp2.de.debian.org/debian-security
#
# There are 2 default internal path_map settings for the Debian and Ubuntu
# changelog servers which will be merged with this option.
#
# debian-changelogs packages.debian.org metadata.ftp-master.debian.org
# ubuntu-changelogs changelogs.ubuntu.com
#
# These can be overridden by specifying an alternative mirror for that key, or
# deleted by just specifying the key with no mirror.
#
#path_map = debian-changelogs
# From version 1.7.0 there is support for caching multiple distibutions (eg
# Debian and Ubuntu) within the same apt-cacher instance. Enable this by setting
# distinct_namespaces to 1. Distribution package files are cached in separate
# directories whose names are derived from the relevant path_map key. So
# generally there will be a path_map key => server(s) setting for each
# distribution that is cached. Having enabled distinct_namespaces, existing
# packages can be imported into the correct directory by running (as root)
#
# /usr/share/apt-cacher/apt-cacher-import.pl -u {cache_dir}/packages
#
#distinct_namespaces = 0
# If the apt-cacher machine is directly exposed to the Internet and you are
# worried about unauthorised machines fetching packages through it, you can
# specify a list of IP addresses which are allowed to use it and another list of
# IP addresses which are prohibited.
#
# Localhost (127.0.0.1/8, ::ffff:127.0.0.1/8 and ::1) are always allowed. Other
# addresses must be matched by allowed_hosts and not by denied_hosts to be
# permitted to use the cache. Setting allowed_hosts to "*" means "allow all"
# (which was the default before version 1.7.0). The default is now ''.
#
# The format is a comma-separated list containing addresses, optionally with
# masks (like 10.0.0.0/24 or 10.0.0.0/255.255.255.0), or ranges of addresses
# (two addresses separated by a hyphen with no masks, specifying a valid subnet,
# like '192.168.0.0-63' or '192.168.0.0 - 192.168.0.63') or a DNS resolvable
# hostname. The corresponding IPv6 options allowed_hosts_6 and denied_hosts_6
# are deprecated (but will still be honoured, if set). IPv6 addresses can now be
# added directly to allowed_hosts and denied_hosts along with IPv4 addresses.
#
allowed_hosts = *
#denied_hosts =
# Only allow HTTPS/SSL proxy CONNECT to hosts or IPs which match an item in this
# list.
#
#allowed_ssl_locations =
# Only allow HTTPS/SSL proxy CONNECT to ports which match an item in this list.
# Adding further items to this option can pose a significant security risk. DO
# NOT do it unless you understand the full implications.
#
#allowed_ssl_ports = 443
# Optional setting to limit access to upstream mirrors based on server names in
# the URLs. This is matched before any path_map settings are expanded. If
# '%PATH_MAP%' in included in this option, it will be expanded to the keys of
# the path_map setting. Note these items are strings, not regexps.
#
#allowed_locations = ftp.uni-kl.de, ftp.nerim.net, debian.tu-bs.de/debian
#allowed_locations = ftp.debian.org, %PATH_MAP%
#allowed_locations = %PATH_MAP%
# List of Architectures that is used to expand %VALID_ARCHS% in *_files_regexps
# (see below).
#
#supported_archs = i386, amd64
#supported_archs = avr32, amd64, alpha, arm, arm64, armel, armhf, hppa, hurd-i386, i386, ia64, kfreebsd-amd64, kfreebsd-i386, m32r, m68k, mips, mipsel, netbsd-alpha, netbsd-i386, powerpc, powerpcspe, ppc64, s390, s390x, sh4, sparc, sparc64, x32
# List of Ubuntu release names used to expand %VALID_UBUNTU_RELEASE_NAMES% in
# *_files_regexp (see below). This is required to allow the Ubuntu installer to
# fetch upgrade information. As the naming scheme is unpredictable, new release
# names need to be added to this list.
#
#ubuntu_release_names = dapper, edgy, feisty, gutsy, hardy, intrepid, jaunty, karmic, lucid, maverick, natty, oneiric, precise, quantal, raring, saucy, trusty, utopic, vivid, wily, xenial, yakkety
### HOUSEKEEPING ###
# Apt-cacher can generate usage reports every 24 hours if you set this directive
# to 1. You can view the reports in a web browser by pointing to your cache
# machine with 'report' on the end, like this:
#
# http://yourcache.example.com:3142/report
#
# Generating reports is very fast even with many thousands of logfile lines, so
# you can safely turn this on without creating much additional system load.
#
#generate_reports = 1
# Apt-cacher can clean up its cache directory every 24 hours if you set this
# directive to 1. Cleaning the cache can take some time to run (generally in the
# order of a few minutes) and removes all package files that are not mentioned
# in any existing 'Packages' lists. This has the effect of deleting packages
# that have been superseded by an updated 'Packages' list.
#
#clean_cache = 1
### INTERNALS ###
# Debug mode makes apt-cacher write a lot of extra debug information to the
# error log (whose location is defined with the 'log_dir' directive). Leave
# this off unless you need it, or your error log will get very big. Acceptable
# values are 0 or an integer up to 7. See man apt-cacher (1) for further
# details.
#
#debug = 0
# You shouldn't need to change anything below here. If you do, ensure you
# understand the full implications of doing so.
# As a convenience the following strings are expanded within the *_files_regexp
# settings at runtime:
# %VALID_UBUNTU_RELEASE_NAMES% --> A regexp derived from ubuntu_release_names
# %VALID_ARCHS% --> A regexp derived from supported_archs
# %VALID_PACKAGE_NAME% --> A regexp matching valid package names
# %VALID_VERSION% --> A regexp matching valid package versions
# Permitted package files -- this is a perl regular expression which matches all
# package-type files (files that are uniquely identified by their filename).
#
#package_files_regexp = (?:(?:^|/)%VALID_PACKAGE_NAME%_%VALID_VERSION%(?:_%VALID_ARCHS%\.(?:u|d)?deb|\.dsc|\.tar(?:\.gz|\.bz2|\.xz)|\.diff\.gz)|\.rpm|index\.db-.+\.gz|\.jigdo|\.template)$
# Permitted APT pdiff files -- this is a perl regular expression which matches
# APT pdiff files which are ed(1) scripts used to patch index files rather than
# redownloading the whole file afresh.
#
#pdiff_files_regexp = (?:^|/)2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$
# Permitted Index files -- this is the perl regular expression which matches all
# index-type files (files that are uniquely identified by their full path and
# need to be checked for freshness).
#
#index_files_regexp = (?:^|/)(?:Index(?:\.bz2)?|(?:Sources|Packages|release)(?:\.(?:x|g)z|\.bz2)?|Release(?:\.gpg)?|InRelease|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|Components-%VALID_ARCHS%\.yml\.(?:x|g)z|icons-(64|128)x\g{-1}\.tar\.(?:x|g)z|Translation-[a-z]{2,3}(?:_[A-Z]{2}(?:\.[a-zA-Z0-9-]+)?)?(?:\.gz|\.bz2|\.xz|\.lzma)?)$
# Permitted installer files -- this is the perl regular expression which matches
# all installer-type files (files that are uniquely identified by their full
# path but don’t need to be checked for freshness). These are typically files
# used by Debian/Ubuntu Installer, Debian Live and apt.
#
#installer_files_regexp = (?:^|/)(?:vmlinuz|linux|initrd\.gz|(?:%VALID_PACKAGE_NAME%_%VALID_VERSION%[_\.])?changelog|NEWS\.Debian|%VALID_UBUNTU_RELEASE_NAMES%\.tar\.gz(?:\.gpg)?|(?:by-hash/(?i:MD5SUM/[0-9a-f]{32}|SHA1/[0-9a-f]{40}|SHA256/[0-9a-f]{64}))|(?:Devel|EOL)?ReleaseAnnouncement(?:\.html)?|meta-release(?:-lts)?(?:-(?:development|proposed))?)$
# Perl regular expression which matches Index files from which to read checksums
# if checksum is enabled.
#
#checksum_files_regexp = (?:^|/)(?:(?:Sources|Packages)(?:\.(?:x|g)z|\.bz2)?|(?:In)?Release|Index(?:\.bz2)?)$
# Perl regular expression which matches files for which checksum validation is
# not performed. NB files matched by installer_files_regexp are skipped
# automatically and do not need to be added here as well.
#
#skip_checksum_files_regexp = (?:^|/)(?:(?:In)?Release|Release\.gpg)$
# Perl regular expression which matches URLs to be permitted for Debian bugs
# SOAP requests as made by apt-listbugs(1).
#
#soap_url_regexp = ^(?:http://)?bugs\.debian\.org(?::80)?/cgi-bin/soap\.cgi$