New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need documentation describing how to configure VirtualHost with mod_pagespeed #116

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 7 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

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
header)?
0.9.10.1-250

On what operating system?
Ubuntu Karmic (9.10)

Which version of Apache?
2.2.12-1ubuntu2.4

Which MPM?
mpm-worker

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 0.9.10.1-250] mod_pagespeed 
is enabled.  The following directives must not be 
NULL\nModPagespeedFileCachePath=\nModPagespeedGeneratedFilePrefix=\n

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 0.9.10.1-250] 
[1125/172228:FATAL:net/instaweb/rewriter/rewrite_driver_factory.cc(205)] Check 
failed: !filename_prefix_.empty(). Must specify --filename_prefix or call 
RewriteDriverFactory::set_filename_prefix.\nBacktrace:\n\t/usr/lib/apache2/modul
es/mod_pagespeed.so 
[0x7fbfe7487dda]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe74796ad]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe7488c5d]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe74cec23]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe747c779]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe74cdf40]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe74ce03c]\n\t/usr/lib/apache2/modules/mod_pagespeed.so 
[0x7fbfe7478e76]\n\t/usr/sbin/apache2(ap_run_handler+0x70) 
[0x7fbfeb755310]\n\t/usr/sbin/apache2(ap_invoke_handler+0x98) 
[0x7fbfeb758c58]\n\t/usr/sbin/apache2(ap_process_request+0x1c8) 
[0x7fbfeb7664e8]\n\t/usr/sbin/apache2 
[0x7fbfeb7633c8]\n\t/usr/sbin/apache2(ap_run_process_connection+0x68) 
[0x7fbfeb75cea8]\n\t/usr/sbin/apache2 
[0x7fbfeb76bdd2]\n\t/usr/lib/libapr-1.so.0 
[0x7fbfeae942ff]\n\t/lib/libpthread.so.0 
[0x7fbfeac55a04]\n\t/lib/libc.so.6(clone+0x6d) [0x7fbfea9bed4d]

Original issue reported on code.google.com by rtuc...@gmail.com on 25 Nov 2010 at 5:36

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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 jmara...@google.com on 30 Nov 2010 at 7:08

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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 jmara...@google.com 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
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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.

Thanks!

Original comment by rtuc...@gmail.com on 18 Dec 2010 at 6:39

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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

Original comment by sligocki@google.com on 31 Dec 2010 at 10:28

  • Changed state: Started
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

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 
example1.com, 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 sligocki@google.com on 3 Jan 2011 at 6:27

  • Changed state: RequestClarification
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

is that considered closed?

Original comment by rab...@google.com on 2 Apr 2011 at 4:36

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 4 Apr 2011 at 5:09

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment