Ubuntu 14.04中缺少nginx php5-fpm conf文件

前端之家收集整理的这篇文章主要介绍了Ubuntu 14.04中缺少nginx php5-fpm conf文件 前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_404_0@

我在Nginx上的PHP5-fpm conf可以正常工作.但是昨天,它不起作用.给了PHP5-fpm -t命令后,出现以下错误

  1. [05-Jul-2016 08:59:32] ERROR: Failed to open configuration file '/etc/PHP5/fpm/PHP-fpm.conf': No such file or directory (2)
  2. [05-Jul-2016 08:59:32] ERROR: Failed to load configuration file '/etc/PHP5/fpm/PHP-fpm.conf'
  3. [05-Jul-2016 08:59:32] ERROR: FPM initialization Failed

在/etc/PHP5/fpm/conf.d和/etc/PHP5/fpm/pool.d上发出ls命令后,没有文件.

我的Nginx conf:

  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server ipv6only=on;
  4. root /var/www/html;
  5. index index.html index.htm index.PHP;
  6. server_name localhost;
  7. location / {
  8. try_files $uri $uri/ /index.PHP?$query_string;
  9. #try_files $uri $uri/ =404;
  10. #try_files $uri $uri/ /index.PHP$is_args$args;
  11. }
  12. error_page 404 /404.html;
  13. error_page 500 502 503 504 /50x.html;
  14. location = /50x.html {
  15. root /var/www/html;
  16. }
  17. location ~ \.PHP${
  18. try_files $uri =404;
  19. fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
  20. fastcgi_pass unix:/var/run/PHP5-fpm.sock;
  21. fastcgi_index index.PHP;
  22. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23. include fastcgi_params;
  24. }
  25. }
最佳答案
这是PHP5-fpm的问题,不是Nginx.

最终,您的配置文件似乎消失了.最好的选择是重新安装PHP5-fpm,清除旧的配置文件,然后替换它们.

在Ubuntu / Debian上:

  1. sudo apt-get purge PHP5-fpm
  2. sudo apt-get install PHP5-fpm

猜你在找的Nginx相关文章