nginx反代被限速
383
- toyst2019-02-14金牌会员116180
用的群晖的docker:nginx:1.15.8-alpine反代的5000端口,用代理端口下载文件速度只有500KB/S左右,用5000原端口能达到3MB/S
nginx.conf配置如下:
- user nginx;
- worker_processes 1;
- - error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- - - events {
- worker_connections 1024;
- }
- - - http {
- upstream dsm {
- server 127.0.0.1:5000;
- }
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- - log_format main '$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.log main;
- - sendfile on;
- #tcp_nopush on;
- - keepalive_timeout 65;
- - #gzip on;
- - 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_page 497 https://$host:8$request_uri;
- location / {
- proxy_pass http://127.0.0.1:5000;
- }
- }复制代码