<div dir="ltr">Have you checked your php-fpm settings and log file? I'm getting a "X-Powered-By: PHP..." header which indicates nginx is corrrectly sending the request to php-fpm.<div>Also I believe you don't really need to set root again inside the "location" blocks since it's already set in it's "server" parent block.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-12 17:17 GMT-02:00 khav <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span>:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am getting File not found error with nginx and i have been trying to fix<br>
this for hours.The config look similar to what i use on other sites but i<br>
don't know why it doesn't work.html files works fine thought.index.php<br>
location is /home/<a href="http://servergreek.com/public_html/www/index.php.Thanks" target="_blank">servergreek.com/public_html/www/index.php.Thanks</a> for<br>
helping me out.My Nginx version : 1.7.8 & php version is PHP 5.5.20 (cli)<br>
(built: Dec 10 2014 14:03:09)<br>
<br>
server {<br>
    listen 80;<br>
    server_name <a href="http://servergreek.com" target="_blank">servergreek.com</a>   <a href="tel:167.88.125.157" value="+16788125157">167.88.125.157</a>;<br>
    return 301 <a href="http://www.servergreek.com" target="_blank">http://www.servergreek.com</a>$request_uri;<br>
}<br>
server {<br>
    listen      80 default_server;<br>
    server_name  <a href="http://www.servergreek.com" target="_blank">www.servergreek.com</a>;<br>
    access_log   /home/<a href="http://servergreek.com/public_html/logs/access_log" target="_blank">servergreek.com/public_html/logs/access_log</a> main;<br>
    error_log     /home/<a href="http://servergreek.com/public_html/logs/error_log" target="_blank">servergreek.com/public_html/logs/error_log</a> crit;<br>
    root /home/<a href="http://servergreek.com/public_html/www" target="_blank">servergreek.com/public_html/www</a>;<br>
    index index.php index.html index.htm;<br>
<br>
    #Serve static content directly<br>
    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|woff)$ {<br>
    access_log off;<br>
    expires max;<br>
    }<br>
<br>
    location ~ ^/tmp/(.*)$ {<br>
    deny all;<br>
    }<br>
<br>
<br>
<br>
    # Zend Opcache rules<br>
        #location  /opcache/ {<br>
            # root /home/<a href="http://servergreek.com/public_html/www" target="_blank">servergreek.com/public_html/www</a>;<br>
            # index index.php index.html index.htm;<br>
            # auth_basic            "Restricted Area (Secured by Khavish)";<br>
            # auth_basic_user_file<br>
/var/www/<a href="http://servergreek.com/private/htpasswd" target="_blank">servergreek.com/private/htpasswd</a>;<br>
        #}<br>
<br>
    # Only requests to our Host are allowed<br>
    if ($host  !~ ^(<a href="http://servergreek.com" target="_blank">servergreek.com</a>|<a href="http://www.servergreek.com" target="_blank">www.servergreek.com</a>)$ ) {<br>
         return 444;<br>
      }<br>
<br>
     location ~* \.php$ {<br>
        root /home/<a href="http://servergreek.com/public_html/www" target="_blank">servergreek.com/public_html/www</a>;<br>
        fastcgi_pass   unix:/tmp/php5-fpm.sock;<br>
        fastcgi_index  index.php;<br>
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
        include        fastcgi_params;<br>
        fastcgi_connect_timeout 60;<br>
        fastcgi_send_timeout 300;<br>
        fastcgi_read_timeout 300;<br>
        fastcgi_buffer_size 128k;<br>
        fastcgi_buffers 256 16k;<br>
        fastcgi_busy_buffers_size 256k;<br>
<br>
    }<br>
<br>
    #location ~ /\.ht {<br>
     #  deny  all;<br>
    #}<br>
<br>
<br>
      }<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,255466,255466#msg-255466" target="_blank">http://forum.nginx.org/read.php?2,255466,255466#msg-255466</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>att.<br></div>Jader H. Silva<br></div></div>
</div>