Getting realpath for a request

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