After adding fastcgi support to nginx, verify the PHP page and report an error file not found. Check the log display
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,
At first, I thought it was a permission problem, so I started to configure it first
location ~ \.php$ { root /data/nginx/html/php; default_type text/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /data/nginx/php$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; //error fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
It looks like the configuration is the same, in fact, there is a w problem here, I am a direct copy of win to linux,, using nginx -t file is OK, not detected at all, you can download the WinMerge file to compare the upper and lower lines, you can also cat -A detect win spaces.
Similar Posts:
- Nginx+PHP FastCGI sent in stderr: “Primary script unknown” while reading response head…
- nginx connect() failed (111: Connection refused) while connecting to upstream
- Nginx Error: File not found [Use php-fpm to parse PHP]
- File not found error handling of nginx accessing PHP files, two cases
- [Solved] Primary script unknown in nginx configuration PHP
- PHP nginx 504 gateway timeout gateway timeout error
- Wnmp environment configuration (Windows + nginx + MySQL + PHP)
- Fix Nginx 502 Error:upstream sent too big header while reading response header from upstream
- The solution of nginx executing PHP, no input file specified
- Error 500 when opening the site configured by nginx