toyst 发表于 2019-2-14 21:36:53

nginx反代被限速

用的群晖的docker:nginx:1.15.8-alpine反代的5000端口,用代理端口下载文件速度只有500KB/S左右,用5000原端口能达到3MB/S


nginx.conf配置如下:

[*]usernginx;
[*]worker_processes1;
[*]
[*]error_log/var/log/nginx/error.log warn;
[*]pid      /var/run/nginx.pid;
[*]
[*]
[*]events {
[*]    worker_connections1024;
[*]}
[*]
[*]
[*]http {
[*]    upstream dsm {
[*]      server 127.0.0.1:5000;
[*]    }
[*]    include       /etc/nginx/mime.types;
[*]    default_typeapplication/octet-stream;
[*]
[*]    log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
[*]                      '$status $body_bytes_sent "$http_referer" '
[*]                      '"$http_user_agent" "$http_x_forwarded_for"';
[*]
[*]    access_log/var/log/nginx/access.logmain;
[*]
[*]    sendfile      on;
[*]    #tcp_nopush   on;
[*]
[*]    keepalive_timeout65;
[*]
[*]    #gzipon;
[*]
[*]    include /etc/nginx/conf.d/*.conf;
[*]}
[*]复制代码


反代配置dsm.conf:
[*]server
[*]{
[*]      listen 8 ssl http2;
[*]    server_name dsm.abc.com abc.com;
[*]    ssl_certificate    /etc/default/fullchain.cer;
[*]    ssl_certificate_key    /etc/default/abc.com.key;
[*]
[*]
[*]      error_page497 https://$host:8$request_uri;
[*]    location / {
[*]    proxy_pass http://127.0.0.1:5000;
[*]    }
[*]}复制代码

haierwx21410 发表于 2019-2-14 21:47:50

我感觉不是nginx的问题吧

周润发 发表于 2019-2-14 21:54:29

不是nginx问题 代理服务器速度不行

toyst 发表于 2019-2-14 22:12:37


周润发 发表于 2019-2-14 21:54

不是nginx问题 代理服务器速度不行
发哥,本机代理的本机啊,相当于代理端口,只是端口不同
页: [1]
查看完整版本: nginx反代被限速