mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Deactivated buffering to reduce reverse proxy as bottle neck
This commit is contained in:
@@ -6,11 +6,16 @@ location /
|
||||
proxy_pass http://127.0.0.1:{{http_port}}/;
|
||||
{% endif %}
|
||||
|
||||
# headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
|
||||
# deactivate buffering
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
# timeouts
|
||||
proxy_connect_timeout 1s;
|
||||
proxy_send_timeout 300s;
|
||||
@@ -19,6 +24,7 @@ location /
|
||||
|
||||
# cache media files
|
||||
location ~* \.(gif|ico|jpg|jpeg|png|svg|mp4|mp3|pdf)$ {
|
||||
proxy_buffering on;
|
||||
proxy_cache cache;
|
||||
proxy_cache_key $host$uri$is_args$args;
|
||||
proxy_cache_revalidate on;
|
||||
@@ -37,6 +43,7 @@ location /
|
||||
|
||||
# cache content
|
||||
location ~* \.(html|css|js)$ {
|
||||
proxy_buffering on;
|
||||
proxy_cache cache;
|
||||
proxy_cache_key $host$uri$is_args$args;
|
||||
proxy_cache_revalidate on;
|
||||
|
Reference in New Issue
Block a user