Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>
This error is very common. There are two kinds of errors
PHP FPM could not find script_ PHP file executed in file name
PHP FPM can’t access the executed PHP, which is a permission problem
The first case
Change the configuration file nginx. Conf
fastcgi_ param SCRIPT_ FILENAME /scripts$fastcgi_ script_ name;
replace with the following
fastcgi_ param SCRIPT_ FILENAME$document_ root$fastcgi_ script_ name;
Then reload the nginx configuration file
/etc/init.d/nginx reload
The second situation
Two solutions:
the first is to set your root folder to allow other users
the second is to find your PHP FPM configuration file, find the following paragraph, and replace Apache with the user group you want
; RPM: apache Choosed to be able to access some dir as httpd
user = apache
; RPM: Keep a group allowed to write in log dir.
group = apache
Similar Posts:
- Nginx+PHP FastCGI sent in stderr: “Primary script unknown” while reading response head…
- [Solved] Nginx-FastCGI-“Primary script unknown” while reading response header from upstream,
- Nginx Error: File not found [Use php-fpm to parse PHP]
- PHP nginx 504 gateway timeout gateway timeout error
- [Solved] Primary script unknown in nginx configuration PHP
- The solution of nginx executing PHP, no input file specified
- [Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- Fix Nginx 502 Error:upstream sent too big header while reading response header from upstream
- nginx connect() failed (111: Connection refused) while connecting to upstream
- Wnmp environment configuration (Windows + nginx + MySQL + PHP)