我遵循了这个优秀的指南,关于如何设置IIS10反向代理来从互联网上打开我的后端akeneo服务器。
它工作得很好,除了我不显示图像。我在IIS日志中看到了所有jpg文件的404个错误(下面一行是图像文件上的404,第二行是正常的200 )
2019-11-07 14:26:30 192.168.1.253 GET /media/show/1%2F8%2F8%2F8%2F188838fd29a44f7eed902ebfe51926bcbf4fe24b_90036_Herbovet_Herbintest_1_L.jpg/thumbnail_small - 80 - 81.241.239.100 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/78.0.3904.87+Safari/537.36 http://ake.xxx.be/ 404 11 0 1
2019-11-07 14:26:30 192.168.1.253 GET /configuration/attribute-option/attribute/nett_content_unit/option options%5Bidentifiers%5D%5B%5D=liter&X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=6d444c39-ea68-407a-969d-5ae2c5fcaad8&SERVER-STATUS=200 80 - 81.241.239.100 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/78.0.3904.87+Safari/537.36 http://ake.xxx.be/ 200 0 0 246
这是在Windows Server 2019,IIS 10上。后端是运行Akeneo的Ubuntu 18.04上的Apache。
这是我的web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://192.168.1.252/{R:1}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://192.168.1.252/(.*)" />
<action type="Rewrite" value="http{R:1}://ake.xxx.be/{R:2}" />
</rule>
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<caching>
<profiles>
<add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="DisableCache" />
</profiles>
</caching>
</system.webServer>
</configuration>
如果您需要更多信息,请让我知道。谢谢,汤姆
发布于 2019-11-20 09:25:28
404.11 -请求包含一个双重转义序列。要解决此问题,您可以尝试执行以下步骤:
1)打开iis管理器,选择站点。
2)点击请求过滤功能。从操作窗格中选择edit feature setting。
3)选中允许双重转义。
此外,请参阅此链接以了解更多详细信息:
https://stackoverflow.com/questions/58751010
复制相似问题