From ae3facfee012b0e6d9adc4c065e489a3ac67f127 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Sep 2026 14:09:20 +0700 Subject: [PATCH] fix: add /sidata alias location in nginx configmap --- helm/sidata/templates/configmap.yaml | 15 +++++++++++++++ helm/sidata/values.yaml | 8 +++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/helm/sidata/templates/configmap.yaml b/helm/sidata/templates/configmap.yaml index 689ed63..70433bb 100644 --- a/helm/sidata/templates/configmap.yaml +++ b/helm/sidata/templates/configmap.yaml @@ -14,6 +14,21 @@ data: fastcgi_param HTTPS on; fastcgi_param HTTP_X_FORWARDED_PROTO https; + # Tangani request yang diawali dengan /sidata + location /sidata { + alias /var/www/html/public; + try_files $uri $uri/ /index.php?$query_string; + + location ~ \.php$ { + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php; + include fastcgi_params; + fastcgi_param HTTPS on; + fastcgi_param HTTP_X_FORWARDED_PROTO https; + } + } + location / { try_files $uri $uri/ /index.php?$query_string; } diff --git a/helm/sidata/values.yaml b/helm/sidata/values.yaml index ca9b3b2..c7db91d 100644 --- a/helm/sidata/values.yaml +++ b/helm/sidata/values.yaml @@ -14,10 +14,12 @@ service: ingress: enabled: true className: nginx - annotations: {} # Hapus use-regex dan rewrite-target + annotations: + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/rewrite-target: /$2 host: dashboard-bpkd.drc-bpkd.data-center.id - path: /sidata - pathType: Prefix + path: /sidata(/|$)(.*) + pathType: ImplementationSpecific env: APP_NAME: "SIDATA"