I'm new to working with nginx but I set up a reverse proxy on a new server that I have and it is definitely slowing down my website and how fast videos and images load.
Maybe somebody here will know of some parameters to add or what I can change for better speed.
Here is my nginx.conf:
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name website.com www.website.com admin.website.com staging.website.com cdn.website.com;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass $scheme://1.xxx.xxx.xxx;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering Off;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_buffers 8 2048k;
proxy_buffer_size 2048k;
client_max_body_size 30m;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}