I try to configure a vhost with Nginx and PHP-FPM.
I have an application with Symfony2.6, i followed this tutorial :
I have this error :
2015/05/05 11:48:32 [error] 5181#0: *5 FastCGI sent in stderr: “Primary
script unknown” while reading response header from upstream, client:
127.0.0.1, server: myserver.local, request: “GET / HTTP/1.1”, upstream:
“fastcgi://127.0.0.1:9000”, host: “myserver.local”
I followed various tutorials on this problem (google is my friend !!)
but it
does not work…
On Tue, May 05, 2015 at 06:01:26AM -0400, vincent123456 wrote:
Hi there,
I have this error :
2015/05/05 11:48:32 [error] 5181#0: *5 FastCGI sent in stderr: “Primary
script unknown” while reading response header from upstream, client:
127.0.0.1, server: myserver.local, request: “GET / HTTP/1.1”, upstream:
“fastcgi://127.0.0.1:9000”, host: “myserver.local”
That error pretty much always means that the fastcgi server cannot find
the file that it thinks it was told to use.
Can you see in your fastcgi server logs what file the fastcgi server
thinks that was?
If not, you may be able to see in your nginx error logs, at debug level,
what fastcgi param values were sent. (You may see these using “tcpdump”
too, if that is simpler to set up.)
The specific fastcgi param that the fastcgi server uses depends on the
server, but it is commonly SCRIPT_FILENAME. If more that one value is
sent, which one the server chooses depends on the server.
The filename that nginx sends in the fastcgi param must be from the
perspective of the fastcgi server – so if the fastcgi server runs in
a chroot, what nginx sends must be adapted.
If you “ls -ld” every directory on the path to the file, do they all
have
“x” permission for the fastcgi-server user?