Answer the question
In order to leave comments, you need to log in
Can nginx serve static from a .war file without unpacking it?
And if so, how?
By "not decompressing it", I mean by decompressing it on the fly (or giving it back unpacked with Content-Encoding: deflate).
Answer the question
In order to leave comments, you need to log in
Bad idea.
Unpacking on the fly (as I understand it with each request) is generally out of the way - the load on the CPU and RAM.
And if the statics is somehow packed there, in any case, it must be unpacked.
In theory, you can use https://github.com/youzee/nginx-unzip-module
Or write your own module.
You can also mount the archive with some fuse-zip and for nginx it will look like regular files. What will happen to the speed and resource consumption, I don’t know
And why give it from war-ki?
After all, it still somehow needs to be deployed to a server. Well, deploy it with the deployment system from the archive to a folder.
Even if you manually upload via FTP, it's still easy to make a script that unzips it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question