如何设置 mod_pagespeed 在所有页面上工作

发布于 2024-09-30 18:10:53 字数 343 浏览 4 评论 0原文

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

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

谢谢。

I've been trying with mod_pagespeed and would like to know if anyone know's how I can add a rule to my httpd.conf that would automatically add all current virtual hosts to the list of running domains:

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

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橘香 2024-10-07 18:10:53

ModPagespeedDomain 似乎接受通配符。从此处

# 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文件中。

ModPagespeedDomain seems to accept wildcards. From 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 *

Place this in the conf file proper, outside any vhosts.

ヅ她的身影、若隐若现 2024-10-07 18:10:53

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

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

请使用类似的内容:

ModPagespeedDomain vhost?.com

除非您实际上位于可以从任何域重写的重写代理后面。

此外,您还可以通过以下方式与我们联系:[电子邮件 受保护] 并在 < 处列出问题a href="http://code.google.com/p/modpagespeed/issues/list" rel="nofollow">http://code.google.com/p/modpagespeed/issues/list

Yes, you can use wildcards, but please don't use ModPagespeedDomain * unless you can actually control the whole web!

This declaration decides which resources to rewrite and which not to. It is a contract saying that all servers matching the pattern will have mod_pagespeed installed!

Please use something like:

ModPagespeedDomain vhost?.com

Unless you are actually behind a rewriting proxy that can rewrite from any domain.

Also, you can contact us at [email protected] and list issues at http://code.google.com/p/modpagespeed/issues/list

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文