我在Nginx上的PHP5-fpm conf可以正常工作.但是昨天,它不起作用.给了PHP5-fpm -t命令后,出现以下错误:
[05-Jul-2016 08:59:32] ERROR: Failed to open configuration file '/etc/PHP5/fpm/PHP-fpm.conf': No such file or directory (2)
[05-Jul-2016 08:59:32] ERROR: Failed to load configuration file '/etc/PHP5/fpm/PHP-fpm.conf'
[05-Jul-2016 08:59:32] ERROR: FPM initialization Failed
在/etc/PHP5/fpm/conf.d和/etc/PHP5/fpm/pool.d上发出ls命令后,没有文件.
我的Nginx conf:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.html index.htm index.PHP;
server_name localhost;
location / {
try_files $uri $uri/ /index.PHP?$query_string;
#try_files $uri $uri/ =404;
#try_files $uri $uri/ /index.PHP$is_args$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.PHP${
try_files $uri =404;
fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
fastcgi_pass unix:/var/run/PHP5-fpm.sock;
fastcgi_index index.PHP;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
最佳答案
原文链接:https://www.f2er.com/nginx/532311.html