feat: enabled gzip compression
This commit is contained in:
Executable → Regular
+16
-4
@@ -24,6 +24,20 @@ server {
|
|||||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 4;
|
||||||
|
gzip_min_length 1024;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_types
|
||||||
|
application/json
|
||||||
|
application/javascript
|
||||||
|
text/plain
|
||||||
|
text/css
|
||||||
|
text/xml
|
||||||
|
application/xml;
|
||||||
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
@@ -32,7 +46,9 @@ server {
|
|||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
proxy_pass http://10.222.0.2:8080;
|
proxy_pass http://10.222.0.2:8080;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,8 +64,4 @@ server {
|
|||||||
|
|
||||||
proxy_pass http://10.222.0.2:4000/;
|
proxy_pass http://10.222.0.2:4000/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /panorama {
|
|
||||||
root /usr/share/nginx/html/lobby-web;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -4,11 +4,11 @@ docker run -d \
|
|||||||
--name nginx \
|
--name nginx \
|
||||||
-p 80:80 \
|
-p 80:80 \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
-v ./data/nginx:/etc/nginx/conf.d \
|
-v ./data/nginx:/etc/nginx/conf.d:ro \
|
||||||
-v ./data/certbot/conf:/etc/letsencrypt \
|
-v ./data/certbot/conf:/etc/letsencrypt \
|
||||||
-v ./data/certbot/www:/var/www/certbot \
|
-v ./data/certbot/www:/var/www/certbot \
|
||||||
-v ./data/nginx/logs:/var/log/nginx \
|
-v ./data/nginx/logs:/var/log/nginx \
|
||||||
-v ./data/nginx/serve:/usr/share/nginx/html \
|
-v ./data/nginx/serve:/usr/share/nginx/html:ro \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
--network=dittmar.dev \
|
--network=dittmar.dev \
|
||||||
nginx
|
nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user