Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将js.gz预压缩的build angular应用程序服务器到IIS窗口10_Angular_Iis - Fatal编程技术网

如何将js.gz预压缩的build angular应用程序服务器到IIS窗口10

如何将js.gz预压缩的build angular应用程序服务器到IIS窗口10,angular,iis,Angular,Iis,我有angular 10应用程序,它是使用gzipper npm包使用以下命令为生产构建的。 “build:prod”:“ng build--prod--aot--build optimizer&&gzip压缩--verbose./dist./dist/gzip” 现在,我的文件夹中有预压缩的gz扩展文件,并试图将其部署到本地IIS上 编译和压缩后的文件。 我没有尝试过任何解决办法,但没有成功。请任何人指导我如何实现这一点或通过IIS部署 我得到了这个错误 我的Web配置是: <

我有angular 10应用程序,它是使用gzipper npm包使用以下命令为生产构建的。 “build:prod”:“ng build--prod--aot--build optimizer&&gzip压缩--verbose./dist./dist/gzip”

现在,我的文件夹中有预压缩的gz扩展文件,并试图将其部署到本地IIS上

编译和压缩后的文件。

我没有尝试过任何解决办法,但没有成功。请任何人指导我如何实现这一点或通过IIS部署

我得到了这个错误

我的Web配置是:

    <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="https" enabled="true" stopProcessing="false">
          <match url="(.*).js" />
          <conditions></conditions>
          <action type="Rewrite" url="{R:1}.js.gz" appendQueryString="true" logRewrittenUrl="true" />
        </rule>
      </rules>
      <outboundRules>
        <rule name="Rewrite content-encoding header" preCondition="IsGZ" stopProcessing="false">
          <match serverVariable="RESPONSE_CONTENT_ENCODING" pattern=".*" />
          <action type="Rewrite" value="gzip" />
        </rule>
        <preConditions>
          <preCondition name="IsGZ">
            <add input="{URL}" pattern="\.gz$" />
          </preCondition>


        </preConditions>
      </outboundRules>
    </rewrite>
    <urlCompression doStaticCompression="false" />
  </system.webServer>
</configuration>


您的错误消息是什么?您尝试了什么?我收到HTTP错误403.14-禁止Web服务器配置为不列出此目录的内容。