NGINX + PHP-FPM error logs miss IP

Szépe Viktor viktor at szepe.net
Wed Sep 3 20:23:33 UTC 2014


Could it be that Apache 2.2 + mod_fastcgi + PHP FPM logs IP addresses  
to errror.log
but NGINX + PHP-FPM does not?

I mean not to a log file specified in error_log configuration option.

[03-Sep-2014 19:37:24 UTC] {message from e.g. error_log()}

*no IP address in the the line

After commenting out `error_log` config option, stdout got back to nginx

2014/09/03 22:14:15 [error] 8831#0: *1 FastCGI sent in stderr: "PHP  
message: File does not exist: errorlog_url_hack  
(s:59:"//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js";)
PHP message: File does not exist: nofollow_robot_trap
PHP message: File does not exist: nofollow_robot_trap
PHP message: File does not exist: nofollow_robot_trap
PHP message: File does not exist: nofollow_robot_trap
PHP message: File does not exist: nofollow_robot_trap
PHP message: File does not exist: nofollow_robot_trap" while reading  
response header from upstream, client: 192.168.12.135, server:  
subdir.wp, request: "GET  
//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js HTTP/1.1",  
upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "subdir.wp"

Here is no separate message for every line, so more `error_log()`  
function's output goes into on nginx error message. But there is a bit  
about the IP: `client: 192.168.12.135`

Could you help me log IP addresses and log PHP's error messages as  
separate messages?


Szépe Viktor
-- 
+36-20-4242498  sms at szepe.net  skype: szepe.viktor
Budapest, XX. kerület






More information about the nginx mailing list