开发者

"port forwarding": redirect calls to webservice at port 8081 to port 80

开发者 https://www.devze.com 2023-01-01 21:54 出处:网络
a colleague of mine wrote a webservice that runs on port 8081 of our Windows 2008 Server. He uses the class ServiceHost, afaik this means its a standalone host (no IIS or ASP involvement). Note: I\'m

a colleague of mine wrote a webservice that runs on port 8081 of our Windows 2008 Server. He uses the class ServiceHost, afaik this means its a standalone host (no IIS or ASP involvement). Note: I'm new into WCF ;)

Now there are some issues with clients behind a firewall blocking the requests to remote port 8081 of our server (where the webservice runs). The easiest solution would be: run the webservice host at port 80 ... But: there is also a Apache 2.2 webserver running on the Windows Server, hosting some websites. By default it runs on port 80.

My solution after some researching: use a virtual host to route requests to a virtual host (lets say http://webs开发者_JAVA技巧ervice.[hostname]:80) to the webservice host (http://[hostname]:8081).

Is this a good idea? Can Apache handle forwards to standalone webservice hosts? It would be nice if someone could lead me on to the right track :)

Best regards, Niels


If your Apache server is your forward facing server and you want the requests to be forwarded to your internal service/IIS you should look at mod_proxy and configuring a reverse proxy.


The easiest solution would be to get a different IP address to run the WCF host on. Then, you could have both listening on the same port but different IP addresses.

0

精彩评论

暂无评论...
验证码 换一张
取 消