【问题标题】:how to set mod_pagespeed to work on all pages如何设置 mod_pagespeed 在所有页面上工作
【发布时间】:2011-05-05 00:36:18
【问题描述】:

我一直在尝试使用 mod_pagespeed 并想知道是否有人知道我如何向我的 httpd.conf 添加一条规则,该规则将自动将所有当前虚拟主机添加到正在运行的域列表中强>:

ModPagepeedDomain http://vhost1.com
ModPagepeedDomain http://vhost2.com
ModPagepeedDomain http://vhost3.com

谢谢。

【问题讨论】:

  • 请不要用一个前所未见的标签提问。这违背了标签系统的意义。
  • @skaffman 我已经纠正了。谢谢。

标签: apache httpd.conf mod-pagespeed


【解决方案1】:

ModPagespeedDomain 似乎接受通配符。来自here

# Wildcards (* and ?) are allowed in the domain specification. Be
# careful when using them as if you rewrite domains that do not
# send you traffic, then the site receiving the traffic will not
# know how to serve the rewritten content.

ModPagespeedDomain *

将它放在适当的 conf 文件中,在任何虚拟主机之外。

【讨论】:

    【解决方案2】:

    是的,您可以使用通配符,但请不要使用 ModPagespeedDomain *,除非您可以真正控制整个网络!

    这个声明决定了哪些资源要重写,哪些不重写。合同规定所有匹配该模式的服务器都将安装 mod_pagespeed!

    请使用类似:

    ModPagespeedDomain vhost?.com
    

    除非您实际上使用了可以从任何域进行重写的重写代理。

    另外,您可以通过 mod-pagespeed-discuss@googlegroups.com 与我们联系,并通过 http://code.google.com/p/modpagespeed/issues/list 列出问题

    【讨论】:

      猜你喜欢
      • 2017-02-16
      • 2012-12-31
      • 2021-07-31
      • 2011-10-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-15
      相关资源
      最近更新 更多