Hi guys,

I have a small scenario where I have a backend (s3 compatible storage), which 
by default generates a directory listing overview of the files stored.
I want to be able to serve an "index.html" file if the file exists, else just 
proxy_pass as normally.

https://gist.github.com/lucasRolff/c7ea13305e9bff40eb6729246cd7eb39

My nginx config for somewhat reason doesn't work – or maybe it's because I 
misunderstand how try_files actually work.

So I have URLs such as:

minio.box.com/bucket1/
minio.box.com/bucket43253/


When I request these URL's I want nginx to check if index.html exists in the 
directory (it's an actual file on the filesystem) - if it does, serve this one, 
else go to @minio location.

For any other file within the directory, I will just go to @minio location so 
if I request unicorn.png it should go in @minio location as well.

Is there any decent (non-evil) way of doing this?

I assume I have to define the root directive to make try_files work, but what 
would I actually have to define, to make nginx use try_files for index.html 
*within* the specific bucket?

Thanks in advance

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to