fix: resolution for nginx path routing, script_filename, and env fallback
This commit is contained in:
+6
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user