我在我的 Ubuntu 14.04 机器上使用 php-fpm 5.5.9 和 nginx 1.4.6。我已经使用 apt-get 包管理器安装了它们。我无法获取我的 index.php 脚本在错误日志和浏览器中遇到的错误的堆栈跟踪。我从 stackoverflow 和其他文章中搜索并实现了几个解决方案,但没有一个对我有用。这是我的 nginx conf 以及我的 php-fpm conf 文件。如果我犯了任何愚蠢的错误,请帮助我。
Nginx 配置:
location ~ \.php$ {
# With php5-fpm:
#try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
fastcgi_pass 127.0.0.1:7777;
fastcgi_index index.php;
}
PHP-FPM 配置:
error_log = /tmp/php5-fpm.log
PHP-FPM 池配置:
catch_workers_output = yes
slowlog = /var/log/php-fpm/$pool.log.slow
listen = 127.0.0.1:7777
php_flag[display_errors] = On
php_admin_value[error_log] = /tmp/fpm-php.www.log
php_admin_flag[log_errors] = On
提前致谢。