P
P
pqgg7nwkd42017-07-26 23:11:28
Nginx
pqgg7nwkd4, 2017-07-26 23:11:28

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

3 answer(s)
R
RidgeA, 2017-07-26
@RidgeA

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.

L
Lynn "Coffee Man", 2017-07-27
@Lynn

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

A
Alexander Pashchenko, 2017-07-31
@point212

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 question

Ask a Question

731 491 924 answers to any question