Alias /renderd-example-map @PROJECT_SOURCE_DIR@/utils/example-map
Redirect /renderd-example-map/leaflet/leaflet.css https://unpkg.com/leaflet/dist/leaflet.css
Redirect /renderd-example-map/leaflet/leaflet.min.js https://unpkg.com/leaflet/dist/leaflet.js

<Directory @PROJECT_SOURCE_DIR@/utils/example-map>
  Allow from all
  AllowOverride All
  DirectoryIndex index.html
  Options +FollowSymLinks
  Order Allow,Deny
</Directory>

<IfModule !tile_module>
  LoadModule tile_module @PROJECT_BINARY_DIR@/src/mod_tile.so
</IfModule>

<VirtualHost @HTTPD0_HOST@:@HTTPD0_PORT@>
  AddTileConfig /bad_tile_config_sock/ bad_tile_config_sock extension=jpg maxzoom=15 mimetype=image/jpeg minzoom=10 tile_dir=@TILE_DIR@
  AddTileConfig /good_add_tile_config/ @DEFAULT_MAP_NAME@_htcp extension=png maxzoom=20 mimetype=image/png minzoom=0 tile_dir=@TILE_DIR@
  AddTileMimeConfig /bad_tile_mime_config_js_sock/ bad_tile_mime_config_js_sock js
  AddTileMimeConfig /bad_tile_mime_config_png_sock/ bad_tile_mime_config_png_sock png
  LoadTileConfigFile @RENDERD_CONF@
  ModTileBulkMode Off
  ModTileCacheDurationDirty 900
  ModTileCacheDurationLowZoom 9 518400
  ModTileCacheDurationMax 604800
  ModTileCacheDurationMediumZoom 13 86400
  ModTileCacheDurationMinimum 10800
  ModTileCacheLastModifiedFactor 0.20
  ModTileEnableDirtyURL On
  ModTileEnableStats On
  ModTileEnableStatusURL On
  ModTileEnableTileThrottling Off
  ModTileEnableTileThrottlingXForward 0
  ModTileMissingRequestTimeout 2
  ModTileRenderdSocketName @RENDERD0_SOCKET@
  ModTileRequestTimeout 3
  ModTileThrottlingRenders 128 0.2
  ModTileThrottlingTiles 10000 1
  ModTileTileDir @TILE_DIR@
</VirtualHost>

<VirtualHost @HTTPD1_HOST@:@HTTPD1_PORT@>
  AddTileConfig /bad_tile_config_tcp/ bad_tile_config_tcp extension=jpg maxzoom=15 mimetype=image/jpeg minzoom=10 tile_dir=@TILE_DIR@
  AddTileConfig /good_add_tile_config/ @DEFAULT_MAP_NAME@_htcp extension=png maxzoom=20 mimetype=image/png minzoom=0 tile_dir=@TILE_DIR@
  AddTileMimeConfig /bad_tile_mime_config_js_tcp/ bad_tile_mime_config_js_tcp js
  AddTileMimeConfig /bad_tile_mime_config_png_tcp/ bad_tile_mime_config_png_tcp png
  LoadTileConfigFile @RENDERD_CONF@
  ModTileBulkMode Off
  ModTileCacheDurationDirty 900
  ModTileCacheDurationLowZoom 9 518400
  ModTileCacheDurationMax 604800
  ModTileCacheDurationMediumZoom 13 86400
  ModTileCacheDurationMinimum 10800
  ModTileCacheExtendedDuration 2592000
  ModTileCacheExtendedHostName @HTTPD1_HOST@
  ModTileCacheLastModifiedFactor 0.20
  ModTileEnableDirtyURL Off
  ModTileEnableStats Off
  ModTileEnableStatusURL Off
  ModTileEnableTileThrottling Off
  ModTileEnableTileThrottlingXForward 1
  ModTileMissingRequestTimeout 3
  ModTileRenderdSocketAddr @RENDERD1_HOST@ @RENDERD1_PORT@
  ModTileRequestTimeout 3
  ModTileThrottlingRenders 128 0.2
  ModTileThrottlingTiles 10000 1
  ModTileTileDir @TILE_DIR@
  ModTileVeryOldThreshold 2678400
</VirtualHost>

<VirtualHost @HTTPD2_HOST@:@HTTPD2_PORT@>
  LoadTileConfigFile @RENDERD_CONF@
  ModTileBulkMode Off
  ModTileCacheDurationDirty 900
  ModTileCacheDurationLowZoom 9 518400
  ModTileCacheDurationMax 604800
  ModTileCacheDurationMediumZoom 13 86400
  ModTileCacheDurationMinimum 10800
  ModTileCacheLastModifiedFactor 0.20
  ModTileEnableDirtyURL Off
  ModTileEnableStats Off
  ModTileEnableStatusURL Off
  ModTileEnableTileThrottling On
  ModTileEnableTileThrottlingXForward 2
  ModTileMaxLoadMissing 0
  ModTileMaxLoadOld 0
  ModTileMissingRequestTimeout 3
  ModTileRenderdSocketName @RENDERD2_SOCKET@
  ModTileRequestTimeout 3
  ModTileThrottlingRenders 10 0.2
  ModTileThrottlingTiles 10 0.2
  ModTileTileDir @TILE_DIR@
  ModTileVeryOldThreshold -10000000
</VirtualHost>

CustomLog @HTTPD_LOG_ACCESS@ "%A:%p %t \"%r\" %>s %b"
ErrorLog @HTTPD_LOG_ERROR@
Group @WWW_GROUP_NAME@
Listen @HTTPD0_HOST@:@HTTPD0_PORT@
Listen @HTTPD1_HOST@:@HTTPD1_PORT@
Listen @HTTPD2_HOST@:@HTTPD2_PORT@
LogLevel debug
PidFile @HTTPD_PID@
ServerName localhost
ServerRoot @PROJECT_BINARY_DIR@/tests
User @WWW_USER_NAME@

<IfModule !access_compat_module>
  LoadModule access_compat_module @HTTPD_LIBEXECDIR@/mod_access_compat.so
</IfModule>
<IfModule !alias_module>
  LoadModule alias_module @HTTPD_LIBEXECDIR@/mod_alias.so
</IfModule>
<IfModule !authz_core_module>
  LoadModule authz_core_module @HTTPD_LIBEXECDIR@/mod_authz_core.so
</IfModule>
<IfModule !dir_module>
  LoadModule dir_module @HTTPD_LIBEXECDIR@/mod_dir.so
</IfModule>
<IfModule !log_config_module>
  LoadModule log_config_module @HTTPD_LIBEXECDIR@/mod_log_config.so
</IfModule>
<If "-f '@HTTPD_LIBEXECDIR@/mod_mpm_event.so'">
  <IfModule !mpm_prefork_module>
    <IfModule !mpm_event_module>
      LoadModule mpm_event_module @HTTPD_LIBEXECDIR@/mod_mpm_event.so
    </IfModule>
  </IfModule>
</If>
<If "-f '@HTTPD_LIBEXECDIR@/mod_mpm_prefork.so'">
  <IfModule !mpm_event_module>
    <IfModule !mpm_prefork_module>
      LoadModule mpm_prefork_module @HTTPD_LIBEXECDIR@/mod_mpm_prefork.so
    </IfModule>
  </IfModule>
</If>
<IfModule !unixd_module>
  LoadModule unixd_module @HTTPD_LIBEXECDIR@/mod_unixd.so
</IfModule>

@DIRECTIVE@
