0

I am trying to serve the files under /data/files with NGINX Unit:

/data
 ├─ /logs
 └─ /files
     └─ /image1.png
     └─ ...

image1.png, for example, should be accessible to the client as /media/image1.png.

I started by creating a route that looks like this:

{
    "match": {
        "uri": "/media/*"
    },
    "action": {
        "share": "/data/files/$uri"
    }
}

The problem is that $uri includes the whole path and not merely the part that matched the wildcard.

Is there a way to make this scenario work with NGINX Unit?

Nathan Osman
  • 2,725
  • 7
  • 32
  • 46

0 Answers0