Record log of full error response?

Reinis Rozitis r at roze.lv
Wed Sep 26 12:27:20 UTC 2012


> serving a custom page instead of the error and just storing the error code 
> in an entry in /var/nginx/log/error.log is not enough for me: I need to 
> log the full page (the response besides the http status code).
> Is there any way to do this? Any config setting I missed?

This suggests your are using dynamic language (like php) for serving error 
pages, right?
While it probably could be done with nginx itself (with using lua/perl 
modules) in case of php you could just buffer the whole output ( 
http://php.net/manual/en/function.ob-start.php ) and store wherever you 
want.


rr 



More information about the nginx mailing list