Why does vue publish to an iis server need a port to run?

the vue-cli project is packaged in webpack and deployed on iis. It is not impossible to access it directly under the port. However, if you deploy under the port and create a new program under that port, the new program project will be ignored

directly use the configuration file officially deployed to IIS by VUE, and other projects under a port cannot be accessed.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Handle History Mode and custom 404/500" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="/" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>


the aaa project program like the figure above cannot access

the second way, if you change the configuration file to this way, the aaa project can be accessed, but the vue project will have the problem of refreshing and reporting 404 errors

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Handle History Mode and custom 404/500" stopProcessing="true">
          <match url="(/.html)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="/index.html" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

I hope the gods will leave a message on the solution. Thank you

Mar.15,2022
Menu