Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Need documentation describing how to configure VirtualHost with mod_pagespeed #116

GoogleCodeExporter opened this issue Apr 6, 2015 · 7 comments


Copy link

What steps will reproduce the problem?
1. Comment out all of /etc/apache2/mods-enabled/pagespeed.conf, replacing with 
<IfModule pagespeed_module>ModPagespeed off</IfModule>
2. Include the former contents of pagespeed.conf into a single virtualhost
3. Attempt to access a non-pagespeed'd virtualhost

What is the expected output? What do you see instead?
I would expect modpagespeed to be disabled globally, but enabled only on 
specifically-configured virtualhosts

What version of the product are you using (please check X-Mod-Pagespeed

On what operating system?
Ubuntu Karmic (9.10)

Which version of Apache?

Which MPM?

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.
When I don't have "ModPagespeed off" in the pagespeed.conf, Apache fails to 
start with:

[Thu Nov 25 17:22:02 2010] [error] [mod_pagespeed] mod_pagespeed 
is enabled.  The following directives must not be 

When I do have "ModPagespeed off" in the pagespeed.conf, Apache starts, but 
fails to serve pages for non-Pagespeed'd virtualhosts, with:

[Thu Nov 25 17:22:28 2010] [alert] [mod_pagespeed] 
[1125/172228:FATAL:net/instaweb/rewriter/] Check 
failed: !filename_prefix_.empty(). Must specify --filename_prefix or call 
[0x7fbfeac55a04]\n\t/lib/ [0x7fbfea9bed4d]

Original issue reported on by on 25 Nov 2010 at 5:36

Copy link

If you want to have the default setting for all virtual hosts be "on" then you 
need to specify a complete configuration in the top level config, including all 
required directives such as ModPagespeedGeneratedFilePrefix.  You can than 
override settings in the VirtualHost.

Alternatively you can omit pagespeed entirely from the top level, and specify 
the complete configuration in the VirtualHost.

Please let me know if this helps.

Original comment by on 30 Nov 2010 at 7:08

Copy link

I'm re-casting this bug as: we need an official Doc section describing best 
practices for configuring mod_pagespeed with VirtualHost

summary was: Unable to enable/configure on a per-virtualhost basis

Original comment by on 3 Dec 2010 at 9:42

  • Changed title: Need documentation describing how to configure VirtualHost with mod_pagespeed
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Copy link

Just wanted to update this: I haven't had a chance to test it in production 
yet, but indeed, it does sound like a documentation/understanding issue :-)  I 
hope to give this another shot soon and will let you know how it goes.


Original comment by on 18 Dec 2010 at 6:39

Copy link

I just ran some experiments with !VirtualHosts and I'm writing a Wiki page at 
VirtualHostExamples. Work in progress.

Original comment by on 31 Dec 2010 at 10:28

  • Changed state: Started

Copy link

Alright, I have an example in VirtualHostExamples, please let me know if that 
is helpful and whether or not it works for you.

It seems to be a little delicate because if you set ModPagespeed off in the, then I think you have to include ModPagespeedFileCachePath and 
ModPagespeedGeneratedFilePrefix directives as well. I'm investigating this.

I'd be glad to hear from anyone with more VirtualHost expertise.

Original comment by on 3 Jan 2011 at 6:27

  • Changed state: RequestClarification

Copy link

is that considered closed?

Original comment by on 2 Apr 2011 at 4:36

Copy link

Original comment by on 4 Apr 2011 at 5:09

  • Changed state: Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

1 participant