File Not Found when running PHP with Nginx

后端 未结 15 1944
后悔当初
后悔当初 2020-12-04 13:59

Recently I installed the latest version of Nginx and looks like I\'m having hard time running PHP with it.

Here is the configuration file I\'m using for the domain:<

15条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 14:36

    I just spent like 40 minutes trying to debug a non-working /status with:

    $ SCRIPT_NAME=/status SCRIPT_FILENAME=/status QUERY_STRING= REQUEST_METHOD=GET cgi-fcgi -bind -connect /var/run/php5-fpm.sock
    

    It just produced "File not found" error, while the actual scripts (that are found on the filesystem) worked just fine.

    Turned out, I had a couple of orphaned processes of php5-fpm. After I killed everything and restarted php5-fpm cleanly, it just went back to normal.

    Hope this helps.

提交回复
热议问题