nginx配置upstream访问很慢
我现在想测试一下nginx负载均衡的,但是我配置了nginx的upstream后,电脑访问起来非常慢,几乎打不开,请各位大侠帮帮忙啊!另外,如果我不用upstream配置项,直接proxy_pass http://ip:8080的话,会快很多,有点懵,也不晓得是怎么回事?附:nginx配置worker_processes 2;
events {
worker_connections 1024;
} #events
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 120;
tcp_nodelay on;
upstream zope {
server ip:8081;
server ip:8080;
}
server {
listen 80;
server_name ip;
location / {
root X:/data/;
if (!-e $request_filename) {
proxy_pass http://zope;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_log logs/error.log debug;
} #server
} #http
--------------------编程问答-------------------- 楼主解决了吗?我也遇到了这个问题 --------------------编程问答-------------------- 我也是遇到了和楼主一样的问题,希望大侠能帮忙解决一下。
补充:Java , Java EE