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).* {