0

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 {
    }
    }
  • Where is the origin server in relation to the proxy server? – Tero Kilkanen Jun 12 '20 at 19:22
  • your website are using wich stack ? php with a framework ? apache ? – EchoMike444 Jun 13 '20 at 04:56
  • I cannot see anything relating to a proxy there. My Nginx has a proxy_path statement which includes the name and size of the proxy. For example; "proxy_cache_path /nginx-cache/stuff/ levels=1:2 keys_zone=mycache:128m inactive=30d max_size=2g;" and you will probably need a proxy_temp_path too. – Admiral Noisy Bottom Jun 15 '20 at 08:26

0 Answers0