fil*_*lip 5 facebook mod-security http-status-code-403
嗨,我遇到了一个非常奇怪的问题.
每当我在Facebook上发布我的网站链接时,他们都会被视为禁忌.
该网站本身运作良好,我在其他网站上链接时没有看到这一点.
这可能是服务器配置错误吗?关于在哪里看的任何想法?
这里有一些信息:
我有一台运行WHM 11.25.0的专用服务器
我在这里使用cPanel 11.25.0托管了2个站点
错误消息:
被禁止
您无权访问此服务器上的/ blog/deepwater-horizon-11 /.
此外,尝试使用ErrorDocument处理请求时遇到404 Not Found错误.
Apache/2.2.14(Unix)mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635服务器www.offshoreinjuries.com端口80
更新:
这是一个示例链接,如果它有帮助.(通知链接页面直接工作正常)
http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.offshoreinjuries.com%2Fblog%2Fdeepwater-horizon-11%2F&h=834ea
更新和答案:
找到问题并在下面添加完整的答案.
您必须在某处读取HTTP_REFERER并拒绝来自Facebook的传入链接.认真.这是行之间发生的事情:
telnet www.offshoreinjuries.com 80
HEAD /blog/deepwater-horizon-11/ HTTP/1.1
Host: www.offshoreinjuries.com
HTTP/1.1 200 OK
Date: Fri, 28 May 2010 09:19:45 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.12
X-Pingback: http://www.offshoreinjuries.com/blog/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Run Code Online (Sandbox Code Playgroud)
200好的,好的.
telnet www.offshoreinjuries.com 80
HEAD /blog/deepwater-horizon-11/ HTTP/1.1
Host: www.offshoreinjuries.com
Referer: http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.offshoreinjuries.com%2Fblog%2Fdeepwater-horizon-11%2F&h=834ea
HTTP/1.1 403 Forbidden
Date: Fri, 28 May 2010 09:21:04 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Content-Type: text/html; charset=iso-8859-1
Run Code Online (Sandbox Code Playgroud)
403禁止,不好.
telnet www.offshoreinjuries.com 80
HEAD /blog/deepwater-horizon-11/ HTTP/1.1
Host: www.offshoreinjuries.com
Referer: http://alvaro.es/
HTTP/1.1 200 OK
Date: Fri, 28 May 2010 09:20:36 GMT
Server: Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.12
X-Pingback: http://www.offshoreinjuries.com/blog/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Run Code Online (Sandbox Code Playgroud)
200再次确定.
您的服务器正在积极拒绝来自Facebook的访问者.
我终于能够查出这种行为的真相了。
我的主机 HostGator 的默认 mod_security 设置包括一组白名单和黑名单。经过检查,我发现这些被.facebook.com/l.php列入黑名单。
l.php 是一个包装页面,提供您即将离开 Facebook 的警告。据我了解,由于这很容易被利用,HostGator 选择将所有出站 Facebook 链接列入黑名单。
我通过从 mod_security 黑名单中删除来解决我的问题.facebook.com/l.php,但是我也可以通过在 WHM 中单击将我的 mod_security 设置重置为默认值(相对于 HostGator 配置)。
| 归档时间: |
|
| 查看次数: |
16054 次 |
| 最近记录: |