Meanwhile, error.log says
Code: Select all
2012/11/10 09:23:36 [error] 7891#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 77.188.254.18, server: vps18089.ovh.net, request: "GET /php.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "vps18089.ovh.net"
Here's my /etc/nginx/sites-available/default file:
Code: Select all
server {
listen 80; ## listen for ipv4
# listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name somewhere ;) ;
access_log /var/log/nginx/localhost.access.log;
location / {
root /var/www;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}
#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#deny all;
#}
}