Welcome! Log In Create A New Profile

Advanced

FastCGI sent in stderr: "Primary script unknown"

May 05, 2015 06:01AM
Hi,

I try to configure a vhost with Nginx and PHP-FPM.

I have an application with Symfony2.6, i followed this tutorial :
http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html#nginx

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...

My configuration :

-> Vhost

server {
server_name myserver.local;
root /datas/www/sf_project/web;
location / {
try_files $uri /app.php$is_args$args;
}

# DEV
location ~ ^/(app_dev|config)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
# PROD
location ~ ^/app\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
internal;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}

-> Nginx.conf
user myuser;

-> php-fpm conf :
user = myuser;
group = myuser;

-> ls -al /datas/www
drwxr-xr-x. 8 myuser myuser 4096 5 mai 11:36 sf_project

-> Permission :
/datas/www/sf_project => 755
/datas/www/sf_project/web/app.php => 644

-> OS / Conf :
Fedora 21 / Nginx 1.6.3 / PHP 5.6.8


Thx for your help
Subject Author Posted

FastCGI sent in stderr: "Primary script unknown"

vincent123456 May 05, 2015 06:01AM

Re: FastCGI sent in stderr: "Primary script unknown"

Thiago Farina May 05, 2015 10:12PM

Re: FastCGI sent in stderr: "Primary script unknown"

Francis Daly May 06, 2015 06:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 308
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready