From cea76d870db579ae7f1780d38c2784acc886b79d Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 8 Jul 2021 23:21:58 -0400 Subject: [PATCH] fixes --- Nginx/Server Blocks/journal.libraryofcode.org.conf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nginx/Server Blocks/journal.libraryofcode.org.conf b/Nginx/Server Blocks/journal.libraryofcode.org.conf index c7f28f4..dc9ae9c 100644 --- a/Nginx/Server Blocks/journal.libraryofcode.org.conf +++ b/Nginx/Server Blocks/journal.libraryofcode.org.conf @@ -32,14 +32,21 @@ server { error_page 404 /index.php; + location ~ ^(.+\.php)(.*)$ { set $path_info $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_TRANSLATED $document_root$path_info; + + if (!-f $document_root$fastcgi_script_name) { + return 404; + } + include fastcgi_params; + fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; - include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.(?!well-known).* {