请求8787和8789的端口不能获取响应数据,但是直接请求8788的端口可以获取响应数据。这是我的Nginx的配置。
#user nobody;
worker_processes 10;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log /usr/local/var/log/nginx/error.log debug;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
stream {
server{
listen 8787;
proxy_pass gintest;
}
upstream gintest{
server localhost:8788;
}
server{
listen 8789;
proxy_buffer_size 16k;
proxy_pass 127.0.0.1:8788;
}
}