@cryptotaxi247 / netdata-1 / commits / 8b820a031

Add gzip compression info to nginx proxy readme (#14773)

Chris Akritidis committed Mar 21, 2023 at 04:39 UTC 8b820a031d76e7cd988813bf19d4bd84bf97ac30
1 file changed +21 -12
docs/Running-behind-nginx.md
+21 -12
@@ -1,12 +1,3 @@
1 -<!--
2 -title: "Running Netdata behind Nginx"
3 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/docs/Running-behind-nginx.md"
4 -sidebar_label: "Running Netdata behind Nginx"
5 -learn_status: "Published"
6 -learn_topic_type: "Tasks"
7 -learn_rel_path: "Configuration/Secure your nodes"
8 --->
9 -
1 # Running Netdata behind Nginx
2
3 ## Intro
@@ -51,7 +42,7 @@ With this method instead of `SERVER_IP_ADDRESS:19999`, the Netdata dashboard can
42 upstream backend {
43 # the Netdata server
44 server 127.0.0.1:19999;
54 - keepalive 64;
45 + keepalive 1024;
46 }
47
48 server {
@@ -216,8 +207,6 @@ If your Nginx is on `localhost`, you can use this to protect your Netdata:
207 bind to = 127.0.0.1 ::1
208 ```
209
219 -
220 -
210 You can also use a unix domain socket. This will also provide a faster route between Nginx and Netdata:
211
212 ```
@@ -259,6 +248,26 @@ Nginx logs accesses and Netdata logs them too. You can prevent Netdata from gene
248 access log = none
249 ```
250
251 +## Use gzip compression
252 +
253 +By default, netdata compresses its responses. You can have nginx do that instead, with the following options in the `location /` block:
254 +
255 +```conf
256 + location / {
257 + ...
258 + gzip on;
259 + gzip_proxied any;
260 + gzip_types *;
261 + }
262 +```
263 +
264 +To disable Netdata's gzip compression, open `netdata.conf` and in the `[web]` section put:
265 +
266 +```conf
267 +[web]
268 + enable gzip compression = no
269 +```
270 +
271 ## SELinux
272
273 If you get an 502 Bad Gateway error you might check your Nginx error log: