我需要一个http代理服务器,将来自mydomain.com的请求重定向到http://localhost:8080 Apache web服务器,使用mod_procy和mod_proxy_http实现这一点,配置如下
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot D:/tmp/iis
DirectoryIndex index.html index.php index.jsp
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
ProxyRequests On
ProxyVia On
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>我的服务器是一台windows计算机,我想使用IIS (Internet信息服务),而不是尝试以下IIS配置:
绑定

<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRuleForReports" stopProcessing="true">
<match url="(/.*)" />
<action type="Rewrite" url="http://localhost:8083/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>IIS重写URL,但不像Apache中的mod_proxy那样将请求转发到另一个服务器。
是否可以在IIS中复制Apache行为?在这种情况下,正确的服务器配置是什么?
发布于 2021-09-06 07:59:28
https://stackoverflow.com/questions/69043183
复制相似问题