-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Do not disable gzip compression for nginx completely #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not disable gzip compression for nginx completely #386
Conversation
|
Maybe somebody could remove irrelevant MIME types from the |
|
I just tried this with the latest master and I could not find a request where this is valid, because we send an etag with every request somehow. So the gzip was never enabled. On the other side we enabled gzip for the static assets in the server itself. I think this can be closed then. |
|
|
Enabling gzip saves about 70 % data transfer and reduces the loading time by about 20 %: (source) |
|
With current master? |
Because we do the GZIP compression in master already. ;) |
With 11.0.3 |
There you have it ;) |
Just upgrade to the 12 beta 2 😉 |
|
Here is the comparison with NC 12 beta 2: (source) |
|
I just performed some tests on Nextcloud 11.0.3 and as well on Nextcloud 12b2 ... Nextclouds performance significantly increased with NGINX 1.13 and ngx_cache_purge enabled. Thanks!!! |
Could you show what you enabled so we can document it? |
|
don't get me wrong but all i configured is shown at https://www.c-rieger.de/nextcloud-installation-guide/
to
to finally yours:
conclusion: |
Sorry :/ Didn't reminded that. |
| gzip_comp_level 4; | ||
| gzip_min_length 256; | ||
| gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; | ||
| gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josh4trunks Any opinions on this? Looks good from my side.
|
@benediktg Could you rebase this? @LukasReschke Are you up to set this also up for apache? I guess it makes sense to gzip the static assets. |
|
I personally have my Nextcloud instance behind a Varnish cache server that does all the gzipping, and gzip is disabled for Nginx. There I gzip all Is it posible to have gzip_types be something like ###EDIT### |
|
@MorrisJobke Of course, I will do it soon.
|
22d9b39 to
c3b9b13
Compare
|
Do you think it would make sense to add gzip_vary on;? (i.e. add the |
Yep - seems that it allows to make this compatible with clients that don't support gzip. |
|
While working on this: Could you also add the same change to the subdir configuration below in the same file? |
c3b9b13 to
33c1100
Compare
see also issue nextcloud#325 Signed-off-by: Benedikt Geissler <benedikt@g5r.eu>
33c1100 to
4077741
Compare
| gzip off; | ||
| # Enable gzip but do not remove ETag headers | ||
| gzip on; | ||
| gzip_vary on; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josh4trunks Forgot to ask you: Any opinion on this? Works here fine and seems to make sense from my point of view.
* thanks to @benediktg * see #386 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
I added it to the release notes: f6497cf |
|
gzip_vary looks good to me. As I said before, I do not personally use gzip with Nginx, I let an upstream Varnish Cache proxy do that for me so I have not dived deep into the various gzip options Nginx has. |




see also issue #325