将域 IIS 重定向到 Apache [英] Redirect domain IIS to Apache

查看:35
本文介绍了将域 IIS 重定向到 Apache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IIS 服务器正在监听端口 80,Apache 正在监听 8080

IIS Server is listening Port 80 and Apache is listening 8080

我在 apache 上部署了网站.

I deployed website on apache.

域名已在 IIS 服务器上注册.如何重定向到从 IISApache 服务器 的调用.就像我输入

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

www.abc.com

(在 IIS 上),它会将调用重定向到 Apache 服务器上的网站(在端口 8080 上)

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

我该怎么做?

推荐答案

您需要在 IIS 上设置反向代理并将其指向 apache 服务器.这是一篇关于如何设置它的博客文章:http://blogs.iis.net/carlosag/archive/2010/04/01/setting-up-a-reverse-proxy-using-iis-url-rewrite-和-arr.aspx

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

它需要设置 URL 重写和应用程序请求路由.

It requires setting up URL Rewrite and Application Request Routing.

摘自博文:

  1. 您需要做的第一件事是在 ARR 中启用代理支持.

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

  1. 为此,只需启动 IIS 管理器并单击树视图中的服务器节点.
  2. 双击应用请求路由缓存"图标
  3. 在操作"面板中选择服务器代理设置..."任务
  4. 并确保选中启用代理"复选框.这将允许服务器中重写到非本地计算机的服务器的任何请求将自动路由到正确的位置,无需任何进一步配置.
  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.

  • 配置 URL 重写以将正确的文件夹及其请求路由到正确的站点.但是,我不会用 UI 步骤来打扰您,而是会向您展示配置,然后逐步解释每个部分的作用.

  • 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.

    请注意,对于这篇文章,我只会处理 Company1,但您可以想象同样的步骤适用于 Company2,为了测试这一点,您只需将下面的配置文件保存为 web.config 并将其保存在您的 inetpub\wwwroot\ 或任何其他站点根目录中,您可以对其进行测试.

    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.

    这篇关于将域 IIS 重定向到 Apache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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