Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Posts
    385

    Nginx PHP-FPM - file not available

    Nginx error log throws error for 404 error pages which are having .php extension.

    site.com/error.asp|pp|anything_except_php is showing error page
    site.com/error.php is showing "File not available"

    Code:
    *2037 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
    Code:
    server_name .site.com;
    
    root /var/www/site.com;
    error_page 404 /404.php;
    access_log /var/log/nginx/site.access.log;
    index index.html index.php;
    
    
    
    if ($http_host != "www.site.com") {
        rewrite ^ http://www.site.com$request_uri permanent;
    }
    
            location ~* \.php$ {
    #           try_files $uri = 404;
                fastcgi_index   index.php;
                fastcgi_pass    127.0.0.1:xxxx;            
                 fastcgi_buffer_size 128k;
                 fastcgi_buffers 256 4k;
                 fastcgi_busy_buffers_size 256k;
                 fastcgi_temp_file_write_size 256k;
                 fastcgi_read_timeout 240;
    
                include         /etc/nginx/fastcgi_params;
                fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    #           fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
            }
    chrome and firefox are showing "File not found."

    Internet explorer is showing
    "Most likely causes:
    •There might be a typing error in the address.
    •If you clicked on a link, it may be out of date."

  2. #2
    Join Date
    Dec 2011
    Location
    Netherlands
    Posts
    831
    In your
    Code:
    location ~* \.php$ {
    
    }
    Try put:

    Code:
    root /var/www/site.com;
    and see if that works

  3. #3
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,966
    He probably fixed it already since this is past the 9 days already.
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  4. #4
    Join Date
    Dec 2011
    Location
    Netherlands
    Posts
    831
    Might be.. who knows

  5. #5
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,966
    Well, imagine if it is his client's site. He is out of the business already if he still didn't fix it until now.
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  6. #6
    Join Date
    Feb 2006
    Location
    Kepler 62f
    Posts
    14,877
    I do long-term stuff all the time. Months can go by, and the answer is still useful.
    || Need a good host?
    || See my Suggested Hosts List || Editorial: EIG/Site5/Arvixe/Hostgator Alternatives
    ||

Similar Threads

  1. Replies: 2
    Last Post: 05-05-2013, 04:33 PM
  2. what is default content of the php-fpm (not php-fpm.conf) file
    By nokia3310 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-22-2012, 05:02 PM
  3. Nginx /Apache vs. LiteSpeed vs. Nginx /PHP FPM
    By Cyrusexxp in forum Web Hosting
    Replies: 5
    Last Post: 05-12-2012, 10:52 AM
  4. Nginx w/ PHP-FPM
    By Tyler in forum Systems Management Requests
    Replies: 2
    Last Post: 11-09-2011, 02:37 AM
  5. Replies: 33
    Last Post: 07-25-2011, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •