I have been having trouble understanding the concept of proxy and want to know if it is possible to use in my use case. I have a web folder with one php file foo.php, I want to know if someone access not existing file for eg bar.php and then can I get that location in nginx config and show in that url but take contents from foo.php. I'm trying to do something like this in nginx but I
m not sure if my thinking is right.

```
location bar.php {
proxy_pass http://localhost/foo.php;
}

```