mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-26 12:05:09 +01:00
Deactivated buffering to reduce reverse proxy as bottle neck
This commit is contained in:
parent
8e5d2a0529
commit
84345be7e2
@ -11,3 +11,7 @@ curl -I {{address}}
|
||||
## performance
|
||||
- https://stackoverflow.com/questions/33703230/caching-images-on-all-folder-levels-of-nginx-reverse-proxy
|
||||
- https://www.tweaked.io/guide/nginx-proxying/
|
||||
- https://serverfault.com/questions/796735/nginx-reverse-proxy-is-slow/796740
|
||||
- https://serverfault.com/questions/741610/what-is-the-difference-between-proxy-request-buffering-and-proxy-buffering-on-ng
|
||||
- https://askubuntu.com/questions/1103626/should-i-enable-client-max-body-size-proxy-request-buffering-and-proxy-bufferin
|
||||
- https://serverfault.com/questions/692577/whats-the-difference-between-proxy-buffer-and-proxy-cache-module-in-nginx-confi
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user