Uncompress files on the fly with NGINX?

Good afternoon.

There server a lot of photos and they are in the same folder. Due to some reasons the decision was made to pack this big pile in single file.

Now it's just a file compiled of all the pictures in order, and the database stored length and offset. Gives the contents of the php script.

Now I want to be involved with NGINX. You have the option to split files in any popular formats (zip without compression, for example). Although zip probably ill-suited, because a search of the archive file can be used by brute force.

The question is: Can I configure NGINX so that it gave one file from the archive?
July 8th 19 at 15:50
1 answer
July 8th 19 at 15:52
Solution
squeeze in a squashfs and mount just to the right place.
Good idea! Just probably need another FS to pick up. No compression with fast file search.
Thank you! - Eryn commented on July 8th 19 at 15:55
: If no compression what's the point? squashfs decompresses quite fast and looking for a files (well, you can still choose the compression level and algorithm). You can just make a big file to do mk.ext2 and mount-o loop. - Violet_Wiso commented on July 8th 19 at 15:58
: the point is to combine numerous files into one. When the folder a lot of files, it becomes very problematic to work with.
Thanks for the clarification, will study. - Eryn commented on July 8th 19 at 16:01
: so no need to keep one directory with many files, the method I use in nginx nginx.org/ru/docs/http/ngx_http_proxy_module.html#... - Violet_Wiso commented on July 8th 19 at 16:04

Find more questions by tags Nginx