Facebook 抓取工具将页面视为空白 [英] Facebook scraper seeing page as blank

查看:26
本文介绍了Facebook 抓取工具将页面视为空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上安装了 Facebook 点赞、分享和评论按钮,大部分功能似乎都运行正常,但是在 Facebook 上分享页面后,缩略图显示一个空白页面(单击缩略图会将用户带到共享页面,因此没有问题).显然,这就是 Facebook 抓取工具看到我的整个网站的方式.

I have installed Facebook like, share and comment buttons on my website and most of functionalities seem to be working ok, but after sharing a page on Facebook, thumbnail shows a blank page (clicking thumbnail takes user to the shared page, so there's no problem with that). Apparently this is how Facebook scraper sees my whole website.

我已经确定可能的原因是抓取工具(出于某种我不知道的原因)在我服务器的/var/www 目录中查找网站文件,而网站位于/var/www/websitename/web.我不知道是什么原因造成的,也无法以某种方式将 Facebook 抓取工具引导到正确的路径.我该怎么做才能使一切正常工作?我正在使用 Debian+Apache+ISPConfig,网站在 Joomla! 上运行.

I have determined that the probable cause is that the scraper (for some reason unknown to me) looks for website files in /var/www directory of my server, while website is located at /var/www/websitename/web. I have no idea what causes this, nor was I able to somehow direct Facebook scraper to correct path. What can I do to make everything work properly? I am using Debian+Apache+ISPConfig, website runs on Joomla!.

推荐答案

并且问题解决了.这不是 SSL 问题,也不是我网站上的任何代码错误.问题出在为 xx.xx.xx.xx:80 和 xx.xx.xx.xx:443 配置的 Apache 虚拟主机.将其更改为 *:80 和 *:443 会自动解决 Facebook 抓取工具列出的所有问题.留下这个答案,以防有人需要它.

And the problem is solved. It was not SSL issue, nor any bug with code on my site. The problem was with Apache virtual host being configured for xx.xx.xx.xx:80 and xx.xx.xx.xx:443. Changing that to *:80 and *:443 automagically solved every problem Facebook scraper ever listed. Leaving this answer in case someone ever needs it.

这篇关于Facebook 抓取工具将页面视为空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆