From 5ca7e58ee0551ffed3540daff8f1b4293ca79d3f Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 19 Sep 2023 11:01:12 -0500 Subject: [PATCH] Restore cgimap config --- images/web/config/production.conf | 13 +++++++++++++ values.staging.template.yaml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/images/web/config/production.conf b/images/web/config/production.conf index 5f6a4619..d0a1c205 100644 --- a/images/web/config/production.conf +++ b/images/web/config/production.conf @@ -17,6 +17,19 @@ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # ======Redirect trafict to CGIMAP==== + # Rules to redirect to port 81 + RewriteCond %{REQUEST_URI} ^/api/0\.6/map + RewriteRule ^.*$ http://127.0.0.1:81%{REQUEST_URI} [P,L] + # Existing rewrites + RewriteRule ^0\.6/map$ - [L,H=fcgi:127.0.0.1:81] + RewriteRule ^0\.6/(nodes|ways|relations)$ - [L,H=fcgi:127.0.0.1:81] + RewriteRule ^0\.6/(way|relation)/([^/]+)/full$ - [L,H=fcgi:127.0.0.1:81] + + # If no match found, fall through to port 80 + RewriteCond %{REQUEST_METHOD} ^(GET|HEAD)$ + RewriteRule ^0\.6/(node|way|relation)/([^/]+)$ - [L,H=fcgi:127.0.0.1:80] + # Relax Apache security settings AllowOverride None diff --git a/values.staging.template.yaml b/values.staging.template.yaml index ca85d866..ec2bac01 100644 --- a/values.staging.template.yaml +++ b/values.staging.template.yaml @@ -99,7 +99,7 @@ osm-seed: enabled: true label_key: nodegroup_type label_value: web - replicaCount: 2 + replicaCount: 1 # Set staticIp, if you are using cloudProvider=gcp staticIp: c serviceAnnotations: