After this, Navigate to the URL and the `phpinfo()` page should open.
+
+
### Serving Static files on a reverse proxy
+
You might have a reverse-proxy site where you need to also serve some static files. Maybe the proxy is some docker app or some external app that you have no control of but want to serve some images on /img or a .html under some random path. This can be easily done by adding the following config under the `server` directive:
+
+
```
+
location /your-path {
+
alias /path/to/files;
+
index example.htm;
+
# try_files $uri $uri/ @reverse_proxy; # Can be added/deleted - Info below
+
```
+
Points to note:
+
- If the provided path conflicts with a path being served by the reverse proxy then the directive set on the `nginx config` always takes priority
+
- Make sure `nginx` has `rw` (read/write) permissions to the directory set in `alias`. You can either group it under `www-data` or `nginx` user depending on your OS or set the permission to _777_.
+
- You can index any file you want (eg. .png/.jpg/.txt/.html/.sh) or turn on `autoindex` so that it lists all files inside of the directory. This can be done by adding or replacing index line with `autoindex on;`.
+
- This `config` does not account for .php and is purely for static content. However, .php is possible with addiotional setup
+
- `try_files` directive is for conflicts. You can setup the reverse-proxy under `@reverseproxy` or any other name of your choosing. So if you have `/img/logos` that is handled by the proxy site and you need to push `/img/vectors` & `/img/background` as static, then use this function to achieve this. _**Note:** If your reverse proxy handles invalid URIs and shows 404/403 pages then your static config will not work with this_.