Created
April 28, 2023 03:22
-
-
Save githubcom13/74798dc7ab846d970e1a2709aefd01c1 to your computer and use it in GitHub Desktop.
Solution for NGINX error 404 and "FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client:"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add the line fastcgi_param | |
root /var/html/www/my-website | |
location ~ \.php$ { | |
# return 200 $document_root$fastcgi_script_name; // uncomment and download the php file and read the link inside the file. Make the necessary corrections | |
# fastcgi_param SCRIPT_FILENAME /var/html/www/my-website/$fastcgi_script_name; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment