Https is pretty slow using NGINX for NodeJs app

enter the code here. I have a web application mapped to multiple domains. One of the domains uses SSL, and the other is simple. I tried using NGINX with nodeJs. The response to my HTTP requests is very slow. Please see the conf file and help me get rid of this problem.

upstream myserver {
        server 127.0.0.1:4502;
        server 127.0.0.1:4500;
}


server {
        listen 0.0.0.0:80;
        server_name a.myserver.com;
        access_log /var/log/nginx/nodetest.log;
        location / {
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          proxy_set_header X-NginX-Proxy true;

          proxy_pass http://myserver/;
          proxy_redirect off;
        }
}

server {
        listen 0.0.0:443;
        server_name myapps.com;
        access_log off;
        ssl on;
        ssl_certificate /mnt/drives/ssl_certificates/daffodilapps/ssl-bundle.crt;
        ssl_certificate_key /mnt/drives/ssl_certificates/daffodilapps/ryans-key.pem;
        location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                proxy_set_header X-NginX-Proxy true;

                proxy_pass http://myserver/;
                proxy_redirect off;
+4
source share
1 answer

, node.js , . , , http https . , nginx SSL - , , nginx, Nginx SSL.

, , , , f1/g1. ( ) SSL, , EC2.

+1

All Articles