du5114 2016-04-02 14:31
浏览 200
已采纳

非常慢的Nginx下载ssl

i have this vhost

    server {
server_name admin.ex.com ;
listen 80 ;
listen [::]:80 ;
##SSL
#listen 443 ssl ;
  listen               *:443 ssl http2 ;
  listen               [::]:443 ssl http2 ;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384$
ssl_ciphers   EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_timeout 10m;
ssl_session_cache   shared:SSL:10m;
ssl_certificate /etc/nginx/ssl/admin.crt;
ssl_certificate_key /etc/nginx/ssl/admin.key;

root /var/www/admin/public/;
index index.php index.html index.htm;
access_log /var/www/admin/admin.log;
auth_basic "Top Secret";
auth_basic_user_file /var/www/admin/.htpasswd;


        location / {
try_files $uri $uri/ =404;
allow 192.168.1.1;
#deny all;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.admin.sock;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}

}


}

its SO SLOW over HTTPS , i tried to visit phpmyadmin and my own php code over http it loads in 2 secs with HTTPS it takes 2-3 minutes , it loads the HTML code it self fast , but to download the resources (CSS-images) it takes so much time , i'm using chrome with the Nginx 1.9 and a self signed certificate . i even tried curl -i both the HTTP and HTTPS , again so much latency between the two , i don't understand what's going on !

UPDATE :: okay after some researching i figured out that if i take an image of exactly the same VPS and applied it to one which is in a server closer to me (Frankfurt instead of NY ) that it gets way faster . is it a distance problem then ? What makes me think again is that why when i use HTTP it's so fast no matter what server it is in .

Any ideas ?

  • 写回答

1条回答 默认 最新

  • dotwc62080 2016-04-05 01:09
    关注

    It turned out to be a location-related problem. I changed the location of the server from New York to Amsterdam which seems to solve the problem.

    I understand that a server can be far and thus reduce the connection speed but I don't understand why it reduces the speed under HTTPS only and not HTTP requests. Kind of weird!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记