Redirect domain IIS to Apache

谁说胖子不能爱 提交于 2019-12-21 15:02:13

问题


IIS Server is listening Port 80 and Apache is listening 8080

I deployed website on apache.

Domain name is registered on IIS server. How can I redirect to a call from IIS to Apache server. Like if I type

www.abc.com

(on IIS), it will redirect call to website on Apache server (on port 8080)

How can I do that?


回答1:


You need to setup a reverse proxy on IIS and point it to the apache server. Here is a blog post about how to set it up: http://blogs.iis.net/carlosag/archive/2010/04/01/setting-up-a-reverse-proxy-using-iis-url-rewrite-and-arr.aspx

It requires setting up URL Rewrite and Application Request Routing.

Excerpt from the blog post:

  1. The first thing you need to do is enable Proxy support in ARR.

    1. To do that just launch IIS Manager and click the server node in the tree view.
    2. Double click the “Application Request Routing Cache” icon
    3. Select the “Server Proxy Settings…” task in the Actions panel
    4. And Make sure that “Enable Proxy” checkbox is marked. What this will do is allow any request in the server that is rewritten to a server that is not the local machine will be routed to the right place automatically without any further configuration.
  2. Configure URL Rewrite to route the right folders and their requests to the right site. But rather than bothering you with UI steps I will show you the configuration and then explain step by step what each piece is doing.

  3. Note that for this post I will only take care of Company1, but you can imagine the same steps apply for Company2, and to test this you can just save the configuration file below as web.config and save it in your inetpub\wwwroot\ or in any other site root and you can test it.



来源:https://stackoverflow.com/questions/19246462/redirect-domain-iis-to-apache

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!