Welcome! Log In Create A New Profile

Advanced

FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

September 23, 2012 07:40PM
Hello,

I went to setup Nginx with php-fpm.

I have3 vhosts for the moment .
I made a script to create vhost and pool file for php-fpm.

I don't know why but my firsts 2 vhosts work but not the third, i obtain this message in a blank page :
File not found.

So, in my log error file :
2012/09/24 00:57:12 [error] 23782#0: *422 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: XX.XX.XX.XX, server: domain.com, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9003", host: "www.domain.com"

This is my vhost :

server {
listen 80;
server_name domain.com www.domain.com;
if ($host !~* ^www\.){
rewrite ^(.*)$ $scheme://www.domain.com;
}
root /home/domain/www;
index index.html index.htm index.php;

access_log /home/domain/logs/domain-access.log;
error_log /home/domain/logs/domain-error.log;

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
error_log off;
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
fastcgi_intercept_errors on;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9003;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}

and php-fpm pool :

; Nom du pool
[domain]
; On utilisera une socket
listen = 127.0.0.1:9003

; Permission pour la socket
listen.owner = domain
listen.group = domain
listen.mode = 0666
listen.backlog = -1

; Utilsateur/Groupe des processus
user = domain
group = domain

; On choisira une gestion dynamique des processus
pm = dynamic

pm.max_children = 10
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5

request_terminate_timeout = 2
request_slowlog_timeout = 1
slowlog = /home/domain/logs/domain-slow.log

chroot = /home/domain/
; Chdir to this directory at the start. This value must be an absolute path.
; Default Value: current directory or / when chroot
chdir = /www/
catch_workers_output = yes

env[HOSTNAME] = $HOSTNAME
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

; Quelques directives de configuration de PHP
php_flag[display_errors] = on
php_admin_value[error_log] = /logs/php_err_domain.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 1M
php_admin_value[upload_max_filesize]= 8M
php_value[max_execution_time] = 2
php_value[include_path] = .:/usr/share/pear:/usr/share/php

Do you have an idea why i have this error ?
SubjectAuthorPosted

FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

chatchatSeptember 23, 2012 07:40PM

Re: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

Sergey BudnevitchSeptember 24, 2012 06:32AM

Re: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

cmpanOctober 31, 2012 11:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready