简体   繁体   中英

IIS ARR does not handle requests on port 80

I have following global rule in IIS 7 on Windows Server 2008 R2

   <rewrite>
        <globalRules>
            <rule name="123" stopProcessing="false">
                <match url=".*" />
                <action type="Rewrite" url="http://work-monitoring/{R:0}" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="work-reports.mydomain.com" />
                </conditions>
            </rule>
        </globalRules>
    </rewrite>
    <proxy enabled="false" />

This rule handles successfully http requests to work-reports.mydomain.com on any port except 80 which results in 404 Not Found error code.

Eg it handles http://work-reports.mydomain.com:777 but http://work-reports.mydomain.com:80 results in 404 Not Found error.

What is wrong with my IIS settings? Failed Request Tracing does not produce any logs. Windows Event logs do not contain any related info

The solution is to define some default site with port 80 and with empty hostname like this

 <binding protocol="http" bindingInformation="*:80:" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM