Skip to content

Commit

Permalink
imagery: support multiple instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Firefishy committed Jun 11, 2024
1 parent 3feb3b4 commit f50bf1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cookbooks/imagery/templates/default/nginx_imagery.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
}

<% if @uses_tiler -%>
upstream tiler_backend {
upstream <%= @name %>_tiler_backend {
server 127.0.0.1:8080 max_fails=0;

keepalive 32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.jpg /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=jpeg break;
rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.jpeg /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=jpeg break;
rewrite ^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.png /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=<%= URI.encode_www_form_component(@source) %>&pixel_selection=first&tile_format=png break;
proxy_pass http://tiler_backend;
proxy_pass http://<%= @site %>_tiler_backend;
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_set_header X-Forwarded-For $remote_addr;
Expand Down

0 comments on commit f50bf1e

Please sign in to comment.