This is on a server running Ubuntu 16.04.3 LTS, serving an Angular web application. The sites works completely fine, but is very slow to load pages, taking a number of minutes at times. I've tried various solution including This. Which did significantly speed up the site but made some pages inaccessible. Any help or tips would be greatly appreciated, thank you!
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl;
ssl_certificate /location/
ssl_certificate_key /location/
root /location/;
index index.html index.htm index.nginx-debian.html;
server_name site.net;
add_header Strict-Transport-Security max-age=500;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:1337/;
proxy_buffering off;
}
}