From 0935c718d6d6a1e56bc1c13e8d342cb0b64fbd98 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 4 Sep 2026 08:51:01 +0700 Subject: [PATCH] fix: resolution for nginx path routing, script_filename, and env fallback --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ffb5e5..4313146 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,23 +57,26 @@ RUN chown -R www-data:www-data /var/www/html \ && chmod -R 775 /var/www/html/storage \ && chmod -R 775 /var/www/html/bootstrap/cache -# Konfigurasi Nginx untuk mendukung path / dan /sidata +# Konfigurasi Nginx presisi untuk subpath /sidata dan PHP-FPM RUN echo 'server { \ listen 80; \ index index.php index.html; \ root /var/www/html/public; \ + \ location /sidata { \ - alias /var/www/html/public; \ try_files $uri $uri/ /sidata/index.php?$query_string; \ } \ + \ location / { \ try_files $uri $uri/ /index.php?$query_string; \ } \ + \ location ~ \.php$ { \ fastcgi_pass 127.0.0.1:9000; \ fastcgi_index index.php; \ include fastcgi_params; \ - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; \ + fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php; \ + fastcgi_param SCRIPT_NAME $fastcgi_script_name; \ } \ }' > /etc/nginx/sites-available/default