wordpress - 带有 wordpress 的 IIS ARR 无法从 Internet 错误超时
问题描述
我的网络中有一个 IIS 服务器,配置了一个域,该域基于 web.config 上的一些 ARR 规则显示了一个 wordpress,该 wordpress 与我网络中的其他服务器中的 xaamp 一起安装。
因此,当您访问 example.com 时,它会显示其位于 192.168.110.104:8080 的 wordpress
当我尝试从我的网络访问 example.com 时,似乎规则工作正常并且 wordpress 内容工作正常,但是当我尝试从 Internet 访问域 example.com 时,它显示了很多错误,看起来像它试图从互联网加载“内部资源”?显然它在没有 CSS 样式的情况下加载,有些图像有效,有些则没有,所以它一团糟。
错误是这样的超时。
GET http://192.168.100.104:8080/wp-content/themes/astra/assets/css/minified/style.min.css?ver=2.4.4 net::ERR_CONNECTION_TIMED_OUT
在wordpress中我配置了:
wordPress (URL) 为http://192.168.100.104:8080 网址: http: //192.168.100.104 :8080
也许我必须将域放在那里而不是本地IP?
这是我来自 IIS 的 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="homepage.asp" />
</files>
</defaultDocument>
<cors enabled="true" failUnlistedOrigins="true">
<add origin="*">
<allowHeaders allowAllRequestedHeaders="true" />
</add>
</cors>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="{C:1}://192.168.100.104:8080/{R:1}" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
</rule>
</rules>
<outboundRules>
<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^http(s)?://192.168.100.104:8080/(.*)" />
<action type="Rewrite" value="http{R:1}://example.com/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<staticContent>
<clientCache cacheControlMode="NoControl" />
</staticContent>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET, PUT, POST, DELETE, HEAD, OPTIONS" />
<add name="Access-Control-Allow-Credentials" value="true" />
<add name="Access-Control-Allow-Headers" value="X-Requested-With, origin, content-type, accept" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
有任何想法吗?提前致谢!
解决方案
推荐阅读
- python - 手写数字识别问题:维数错误
- http - 错误状态:无法设置内容类型为“application/json”的请求的正文字段
- typescript - 如何使用 jsx/tsx 渲染修复错误未知的自定义 Vuetify 元素?
- vue.js - VueJS 插槽:为什么从父级通过插槽传入的子方法不起作用?
- jmeter - 使用 BIRT 报告进行 JMeter 测试
- java - 引导层初始化期间显示 Selenium 脚本错误
- angularjs - 如何将对象从 Spring Controller 传递到 AngularJS
- opencv - 最佳目标检测和跟踪算法
- html - 表格子项的动态宽度
- angular - 如何使用 Angular 7 发送电子邮件