简体   繁体   English

在ubuntu 14.04中缺少nginx php5-fpm conf文件

[英]nginx php5-fpm conf file missing in ubuntu 14.04

My php5-fpm conf on nginx works correctly . 我在nginx上的php5-fpm conf工作正常。 But yesterday, it didn't work. 但昨天,它没有奏效。
After giving php5-fpm -t command , I get following error: 在给出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

After giving ls command on /etc/php5/fpm/conf.d and /etc/php5/fpm/pool.d, there is no file. 在/etc/php5/fpm/conf.d和/etc/php5/fpm/pool.d上发出ls命令后,没有文件。

My Nginx conf: 我的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;
}
}

This is an issue with php5-fpm , not nginx . 这是php5-fpm的问题,而不是nginx

Ultimately, your config files seem to have disappeared. 最终,您的配置文件似乎已经消失。 Your best bet is to reinstall php5-fpm , purging the old config files, and replacing them. 你最好的办法是重新安装php5-fpm ,清除旧的配置文件,然后更换它们。

On Ubuntu/Debian: 在Ubuntu / Debian上:

sudo apt-get purge php5-fpm
sudo apt-get install php5-fpm 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM