-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3df90fe
commit ecffdb3
Showing
9 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
proxy_cache_path /var/cache/nginx/poi levels=1:2 keys_zone=poi:8m max_size=20g inactive=180d use_temp_path=off; | ||
|
||
server { | ||
listen {{ poi_cache_port }}; | ||
listen [::]:{{ poi_cache_port }}; | ||
|
||
error_page 403 /unauthorized.png; | ||
location = /unauthorized.png { | ||
ssi on; | ||
internal; | ||
auth_basic off; | ||
root /var/www/html; | ||
} | ||
|
||
location ~* \.(pbf)$ { | ||
proxy_pass http://127.0.0.1:{{ poi_pg_tileserv_port }}; | ||
# configure server-side cache | ||
proxy_cache poi; | ||
proxy_cache_valid 200 2h; | ||
proxy_buffering on; | ||
|
||
# update the tiles in the background | ||
proxy_cache_background_update on; | ||
# only one request per tile | ||
proxy_cache_lock on; | ||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; | ||
|
||
add_header X-Cached $upstream_cache_status; | ||
# cache client-side for one hour | ||
add_header "Cache-Control" "public, max-age=3600, must-revalidate"; | ||
|
||
#valid_referers none blocked {{ tileserver_allowed_referrers |join(' ') }}; | ||
|
||
if ($invalid_referer){ | ||
return 403; | ||
} | ||
} | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:{{ poi_pg_tileserv_port }}/; | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ poi_domain }} { | ||
reverse_proxy localhost:{{ poi_cache_port }} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters