From: Grant Slater Date: Tue, 9 Jan 2024 17:36:58 +0000 (+0000) Subject: imagery: fixes for host and https X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/036734d15e6cd4fbc57e031ceca870f6c90e53bf imagery: fixes for host and https --- diff --git a/cookbooks/imagery/recipes/default.rb b/cookbooks/imagery/recipes/default.rb index 6b4cbe9db..a473b4452 100644 --- a/cookbooks/imagery/recipes/default.rb +++ b/cookbooks/imagery/recipes/default.rb @@ -70,10 +70,10 @@ execute "uk_os_OSTN15_NTv2_OSGBtoETRS.tif" do not_if { ::File.exist?("/usr/share/proj/uk_os_OSTN15_NTv2_OSGBtoETRS.tif") } end -nginx_site "default" do - template "nginx_default.conf.erb" - directory "/srv/imagery/default" -end +# nginx_site "default" do +# template "nginx_default.conf.erb" +# directory "/srv/imagery/default" +# end systemd_tmpfile "/run/mapserver-fastcgi" do type "d" diff --git a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb index 2ce67a36b..85961b8cf 100644 --- a/cookbooks/imagery/templates/default/nginx_titiler.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_titiler.conf.erb @@ -33,12 +33,12 @@ server { gzip_comp_level 9; gzip_vary on; - location /api/v1/titiler { + location / { rewrite ^/api/v1/titiler(.*)$ $1 break; proxy_pass http://localhost:8080; proxy_set_header HOST $host; proxy_set_header Referer $http_referer; proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto https; } }