# Display/log value of document\_root

**URL:** <https://www.ruby-forum.com/t/display-log-value-of-document-root/225196>\
**Category:** NGINX\
**Created:** [December 20, 2012, 12:32am UTC](https://www.ruby-forum.com/t/display-log-value-of-document-root/225196 "2012-12-20T00:32:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [December 20, 2012, 12:32am UTC](https://www.ruby-forum.com/t/display-log-value-of-document-root/225196/1 "2012-12-20T00:32:59Z")

</div>

I am currently debugging a problem where PHP-FPM claims that there is  
“No  
input file specified”, but the file clearly exists in that location.

Is it possible to ask nginx to log the value or display the value of  
$document\_root and $fastcgi\_script\_name to a file?

Thanks 🙂

Posted at Nginx Forum:

> **[Display/log value of document\_root](https://forum.nginx.org/read.php?2,234213,234213#msg-234213)**
>
> I am currently debugging a problem where PHP-FPM claims that there is "No input file specified", but the file clearly exists in that location. Is it possible to ask nginx to log the value or display the value of $document\_root and...

---

<div class="post-metadata">

**Author:** ![abxccd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c6cbf5/32.png) [@abxccd](https://www.ruby-forum.com/u/abxccd)\
**Post date:** [December 20, 2012, 12:04pm UTC](https://www.ruby-forum.com/t/display-log-value-of-document-root/225196/2 "2012-12-20T12:04:04Z")

</div>

Hello.

Please, try:

at “http” context:  
log\_format debug\_phpfpm ‘$remote\_addr [$time\_local] “$request” $status  
$document\_root $fastcgi\_script\_name’;

then:

location ~ .php$ {  
access\_log /var/log/nginx/debug-fpm.log debug\_phpfpm;  
fastcgi\_pass …;  
}

2012/12/20 abxccd [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
