When deploying ZABBIX’s LNMP environment, the test PHP page can’t be opened. Check the error log of nginx and report an error fastcgi send in stderr: “primary script unknown” while reading response header from upstream
1. Online query has modified nginx. Conf, as follows
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
to
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Then execute service nginx reload or service nginx restart or enter/etc/init.d/nginx restart
The author is to modify the above configuration to solve the problem
2. Some say that user and group in PHP FPM do not specify nginx as their user( My configuration has been specified in advance, so rule out this reason. Students without configuration can try.)
edit php-fpm
vi /usr/local/php/etc/php-fpm.conf
line 149
Similar Posts:
- File not found error handling of nginx accessing PHP files, two cases
- [Solved] Nginx-FastCGI-“Primary script unknown” while reading response header from upstream,
- PHP nginx 504 gateway timeout gateway timeout error
- [Solved] Primary script unknown in nginx configuration PHP
- Nginx Error: File not found [Use php-fpm to parse PHP]
- The solution of nginx executing PHP, no input file specified
- Wnmp environment configuration (Windows + nginx + MySQL + PHP)
- [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