El proxy inverso de Nginx tarda ~15 segundos en cargarse la página

El proxy inverso de Nginx tarda ~15 segundos en cargarse la página

Esta es la primera vez que uso nginx, así que realmente no sé si es de esperarse. Sin nginx, la página normalmente debería iniciarse en menos de 5 segundos. Revisé los registros de errores y no parece haber ningún error.

Aquí está mi configuración de nginx:

server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name localhost;
        return 301 https://$server_name$request_uri;

        root /var/www/html;
        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }


server {
        # SSL Configuration
        listen 443 ssl http2 default_server;
        listen [::]:443 ssl http2 default_server;
        server_name localhost;
        include snippets/self-signed.conf;
        include snippets/ssl-params.conf;
        # HTTP Basic Auth
        auth_basic "Private Property";
        auth_basic_user_file /etc/nginx/.htpasswd;
        # Proxy Settings
        proxy_buffers 32 4m;
        proxy_busy_buffers_size 25m;
        proxy_buffer_size 512k;
        proxy_ignore_headers "Cache-Control" "Expires";
        proxy_max_temp_file_size 0;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 1024m;
        client_body_buffer_size 4m;
        proxy_connect_timeout 300;
        proxy_read_timeout 300;
        proxy_send_timeout 300;
        proxy_intercept_errors off;
        proxy_set_header Referer $http_referrer;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_redirect off;
        proxy_headers_hash_max_size 512;

        location / {
                proxy_pass http://127.0.0.1:8080/;
        }
        location /graphql {
                proxy_pass http://127.0.0.1:4200/;
        }
}

información relacionada