Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm stuck with a File Not Found issue with Nginx and FastCGI for PHP. Could someone have a look at my conf file?

server {

        listen   80; ## listen for ipv4
        listen   [::]:80 default ipv6only=on; ## listen for ipv6

        server_name  localhost;

        access_log  /var/log/nginx/localhost.access.log;

        root   /var/www/site1;
        location / {
                index  index.html index.htm;
        }

        location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9090;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
        include fastcgi_params;
        }

        location /doc {
                root   /usr/share;
                autoindex on;
                allow 127.0.0.1;
                deny all;
        }

        location /images {
                root   /usr/share;
                autoindex on;
        }

}
share|improve this question

One of your fastcgi_params is wrong.

It should read:

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.