mod_pagespeed 没有启用或从未安装模块的错误

mod_pagespeed error without the module enabled or ever been installed

从我们新服务器的第一天开始,我们就收到了后缀为 pagespeed.(ic/jc/cc) 的 url 请求,但这些请求并不存在。

例如

File name too long: [client {CLIENT IP ADDRESS}:58749] AH00036: access to /wp-content,_plugins,_wp-file-upload,_vendor,_datetimepicker,_jquery-ui-timepicker-addon.min.js,qver==4.6+wp-includes,_js,_jquery,_ui,_sortable.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tabs.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_accordion.min.js,qver==1.11.4.pagespeed.jc.zgb126SHUb.js failed (filesystem path '/home/{DOMAIN HOME DIR}/public_html/wp-content,_plugins,_wp-file-upload,_vendor,_datetimepicker,_jquery-ui-timepicker-addon.min.js,qver==4.6+wp-includes,_js,_jquery,_ui,_sortable.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tabs.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_accordion.min.js,qver==1.11.4.pagespeed.jc.zgb126SHUb.js')

这看起来像是使用 mod_pagespeed 的 javascript 聚合,根据以下链接,它看起来像是 mod_pagespeed 中的一个旧错误(github 是导入的和原始错误日期 ~2010) .

https://github.com/pagespeed/mod_pagespeed/issues/140 https://github.com/pagespeed/mod_pagespeed/issues/9 https://groups.google.com/forum/#!msg/mod-pagespeed-discuss/zvsw368HeJw/hjrR1lZmFdMJ

我们没有在 WHM 中安装 mod_pagespeed,当 运行 "apachectl -l" 它也不在编译的 apache 模块中。

我在服务器的 files/db 中找不到任何这方面的痕迹,它已经出现在我们所有的网站上

有没有人遇到过这个问题或者可能是什么原因造成的?

apachectl -l 无济于事,因为它只显示在模块中编译。 mod_pagespeed单独编译

请使用此命令:

httpd -t -D DUMP_MODULES(这将显示所有加载的模块)

您可以查看 /etc/httpd/conf 或 /usr/local/apache/conf 或 /etc/apache2/conf 中是否有任何 pagespeed.conf 文件(我提供了多个位置,因为我不知道 cPanel/WHM 版本,如果你有 apache 2.2.x 或 apache 2.4.x 等)。

您还可以发出 find / -type f -name "pagespeed.conf"

尝试使用以下命令搜索 pagespeed:grep -r -i pagespeed * 在您的 apache 网络服务器的任何上述配置位置。

如果您有 pagespeed.conf,请对其进行编辑并将 ModPagespeed on(启用 mod_pagespeed)替换为 ModPagespeed off(禁用它)。然后重启 apache /etc/init.d/httpd restart (for CentOS 6.x) 或 systemctl restart httpd (CentOS 7.x)

对于特定网站,转到 /home/cpaneluser/public_html 并在 .htaccess 文件中添加以下指令:

ModPagespeed关闭

不需要重启apache。如果您在保存该特定网站的 .htaccess 文件后出现 500 错误,那么您肯定没有 mod_pagespeed 活动。