IIS:Websocket和IIS共享端口443 [英] IIS: Websocket and IIS sharing port 443

查看:94
本文介绍了IIS:Websocket和IIS共享端口443的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用IIS 7.5是否可以在端口443上托管安全的https网站,并且还可以使Java应用程序在443上运行Socket.IO websocket?

Is it possible with IIS 7.5 to host a secure https website on port 443 and to have a Java app run Socket.IO websocket on 443 also?

当前,我们在443上运行网站,并在另一个端口10001上运行安全websocket,但是我们在用户防火墙方面遇到问题,希望将websocket移至更好的已知默认"端口.

Currently we run the website on 443 and the secure websocket on another port 10001, but we are having issues with user firewalls and would like to move the websocket to a better "known default" port.

我知道IIS 8具有WebSocket功能,但除非必要,否则我们不必将服务器实例升级到Server 2012.

I know that IIS 8 has WebSocket capability but we would perfer not to have to upgrade our server instances to server 2012 unless we must.

推荐答案

给定IP地址上的两个单独的进程不能同时侦听相同的传入端口.因此,您不能让IIS和Java应用程序都侦听相同的端口.此外,webSocket协议从Web请求开始(IIS服务器将处理该请求),然后当看到某些升级"标头并且双方都同意时,然后将完全相同的套接字升级"为webSocket协议,这使得很难有两个单独的过程参与.

Two separate processes on a given IP address cannot both listen for the same incoming port. So, you can't have both IIS and a Java application listening for the same port. In addition, the webSocket protocol starts out as a web request (which the IIS server would handle) and then when certain "upgrade" headers are seen and both sides agree, the very same socket is then "upgraded" to the webSocket protocol which makes it hard to have two separate processes participating.

我想到的唯一方法是在IIS中为webSocket构建一个代理".当到IIS服务器的传入连接具有webSocket升级标头时,您将必须将其代理到Java应用程序(在其他端口上),然后在该处可以从那里处理事物(而实际的套接字继续通过IIS进行代理) ).

The only way I can think of to do this would be to build into IIS a "proxy" for webSocket. When an incoming connection to the IIS server has the webSocket upgrade headers, you would have to proxy that over to your Java application (on a different port) where it could then process things from there (while the actual socket continued to be proxied through IIS).

可能有一种实际的产品可以执行此代理分离,您可以将其放置在IIS服务器的前面来为您完成此操作,但是现在我认为您得到的复杂性令人惊讶,我想知道如果您真的应该只使用干净的解决方案并进行升级.

It is possible that there might be an actual product that could do this proxy separation that you could put in front of your IIS server to do this for you, but now I think you're getting enough complication that I'd wonder if you should really just go for the clean solution and upgrade.

可以将webSocket放在端口80上吗?客户应该对此感到满意.

Can you put the webSocket on port 80? Clients should be fine with that.

这篇关于IIS:Websocket和IIS共享端口443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆