配置文件設置
proxy_buffering off;
#引用反向代理規(guī)則,注釋后配置的反向代理將無效
include /www/server/panel/vhost/nginx/proxy/plus.chatyx.net/*.conf;
proxy反向代理配置
location ^~ / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://127.0.0.1:8787;
}
}
分別測試了在域名(nginx代理)和ip+端口的情況下,ip+端口的速度明顯更快
nginx版本:1.24.0
https://kiosk007.top/post/http2-%E6%94%AF%E6%8C%81%E5%88%86%E5%9D%97%E4%BC%A0%E8%BE%93/
應該是http2不兼容這個,老大考慮兼容一下http2用stream或者websocket嗎