source: subversion/applications/utils/mod_tile/mod_tile.conf @ 18591

Last change on this file since 18591 was 16386, checked in by apmon, 10 years ago

[mod_tile] Update the sample config file to include the cacheing parameters

File size: 3.6 KB
Line 
1# This is the Apache server configuration file for providing OSM tile support
2# through mod_tile
3
4LoadModule tile_module modules/mod_tile.so
5
6<VirtualHost *:80>
7    ServerName tile.openstreetmap.org
8    ServerAlias a.tile.openstreetmap.org b.tile.openstreetmap.org c.tile.openstreetmap.org d.tile.openstreetmap.org
9    DocumentRoot /var/www/html
10
11# You can either manually configure each tile set
12#    AddTileConfig /folder/ TileSetName
13
14# or load all the tile sets defined in the configuration file into this virtual host
15    LoadTileConfigFile /etc/renderd.conf
16
17# Timeout before giving for a tile to be rendered
18    ModTileRequestTimeout 3
19
20# If tile is out of date, don't re-render it if past this load threshold (users gets old tile)
21    ModTileMaxLoadOld 2
22
23# If tile is missing, don't render it if past this load threshold (user gets 404 error)
24    ModTileMaxLoadMissing 5
25
26# Socket where we connect to the rendering daemon
27    ModTileRenderdSocketName /var/run/renderd/renderd.sock
28
29##
30## Options controlling the cache proxy expiry headers. All values are in seconds.
31##
32## Caching is both important to reduce the load and bandwidth of the server, as
33## well as reduce the load time for the user. The site loads fastest if tiles can be
34## taken from the users browser cache and no round trip through the internet is needed.
35## With minutely or hourly updates, however there is a trade-off between cacheability
36## and freshness. As one can't predict the future, these are only heuristics, that
37## need tuning.
38## If there is a known update schedule such as only using weekly planet dumps to update the db,
39## this can also be taken into account through the constant PLANET_INTERVAL in render_config.h
40## but requires a recompile of mod_tile
41
42## The values in this sample configuration are not the same as the defaults
43## that apply if the config settings are left out. The defaults are more conservative
44## and disable most of the heuristics.
45
46# Upper bound on the length a tile will be set cacheable, which takes
47# precedence over other settings of cacheing
48ModTileCacheDurationMax 604800
49
50# Sets the time tiles can be cached for that are known to by outdated and have been
51# sent to renderd to be rerendered. This should be set to a value corresponding
52# roughly to how long it will take renderd to get through its queue. There is an additional
53# fuzz factor on top of this to not have all tiles expire at the same time
54ModTileCacheDurationDirty 900
55
56# Specify the minimum time mod_tile will set the cache expiry to for fresh tiles. There
57# is an additional fuzz factor of between 0 and 3 hours on top of this.
58ModTileCacheDurationMinimum 10800
59
60# Lower zoom levels are less likely to change noticeable, so these could be cached for longer
61# without users noticing much.
62# The heuristic offers three levels of zoom, Low, Medium and High, for which different minimum
63# cacheing times can be specified.
64
65#Specify the zoom level below  which Medium starts and the time in seconds for which they can be cached
66ModTileCacheDurationMediumZoom 13 86400
67
68#Specify the zoom level below which Low starts and the time in seconds for which they can be cached
69ModTileCacheDurationLowZoom 9 518400
70
71# A further heuristic to determine cacheing times is when was the last time a tile has changed.
72# If it hasn't changed for a while, it is less likely to change in the immediate future, so the
73# tiles can be cached for longer.
74# For example, if the factor is 0.20 and the tile hasn't changed in the last 5 days, it can be cached
75# for up to one day without having to re-validate.
76ModTileCacheLastModifiedFactor 0.20
77
78
79###
80###   
81# increase the log level for more detailed information
82    LogLevel debug
83
84</VirtualHost>
85
Note: See TracBrowser for help on using the repository browser.