# Getting realpath for a request

**URL:** <https://www.ruby-forum.com/t/getting-realpath-for-a-request/244943>\
**Category:** NGINX\
**Created:** [July 15, 2016, 7:05am UTC](https://www.ruby-forum.com/t/getting-realpath-for-a-request/244943 "2016-07-15T07:05:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 15, 2016, 7:05am UTC](https://www.ruby-forum.com/t/getting-realpath-for-a-request/244943/1 "2016-07-15T07:05:44Z")

</div>

Hi,

I am creating a nginx proxy handler to talk to a backend server. In that  
handler, I would like to get the physical path of the file to be served  
by a request. The file can be present in the docroot of nginx or any  
alias. How can I get this information?

Regards,  
Chinoy
