0
我有以下基础设施,并希望使用运行Openfire服务器的内部xmpp服务器(服务器2)提供在线网络聊天(在服务器1上)。HTTP绑定代理/网关
湾< ---->服务器1 < ---->服务器2
服务器1只能达到服务器2通过HTTP代理。所以我需要在服务器1上获得一个HTTP绑定或其他东西的可能性,它提供了像JWChat或Co.这样的网络聊天的绑定。我认为简单的重定向到服务器2上的HTTP绑定会很好,但是我不知道如何。
也许有另一种可能性,谢谢任何意见。
编辑:
nginx的配置,现在是这样的:
server {
listen 8000;
server_name server1 localhost;
location ~ ^/http-bind {
proxy_pass http://server2:8085;
}
location/{
proxy_pass http://proxy:3128;
}
}
但下面的命令不能正常工作:
-bash-4.1# wget http://localhost:8000
--2012-02-06 10:57:14-- http://localhost:8000/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... 400 Bad Request
2012-02-06 10:57:14 ERROR 400: Bad Request.
-bash-4.1# wget http://localhost:8000/http-bind
--2012-02-06 10:57:21-- http://localhost:8000/http-bind
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2012-02-06 10:57:21 ERROR 502: Bad Gateway.
有什么不对?
我可以配置nginx使用代理来访问服务器2吗? – CSchulz 2012-02-04 13:49:13
当然,nginx会代理你的其他代理。不是什么意思,但是你可以 – ggozad 2012-02-04 15:07:13
但是nginx必须使用代理来访问服务器2. – CSchulz 2012-02-04 16:40:27