From 2acea545ae0128acdbe23922612fc16c101406fd Mon Sep 17 00:00:00 2001 From: David D'ALMEIDA Date: Wed, 21 Feb 2024 12:19:53 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Sources/config/ngi?= =?UTF-8?q?nx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/config/nginx.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Sources/config/nginx.conf b/Sources/config/nginx.conf index 66d5a452..e69e6bb0 100755 --- a/Sources/config/nginx.conf +++ b/Sources/config/nginx.conf @@ -4,4 +4,19 @@ server { root /var/www/public; error_page 404 /index.php; + location ~ ^/(images|javascript|js|css|flash|media|static)/ { + root /var/www/public; + } + + location ~ \.php$ { + fastcgi_pass web:9000; # service name defined in docker-compose.yml file like web + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location / { + try_files $uri $uri/ /index.php?$query_string; + } } \ No newline at end of file