mod_pagespeed in 5.2

Hedloff

Well-Known Member
#1
Hello,
Very happy that you have added support for this! :)
I would like to enable this, but not server-wide. It would be great if I could enable this on all servers, but let customers add this in their .htaccess file if they would like to use it.
Is that possible? Couldn't find any information about pagespeed in your wiki....yet :)

If nothing is set at "PageSpeed Settings" is there any defaults used? Or do we need to use and setup these from:
https://modpagespeed.com/doc/ ?
 

mistwang

LiteSpeed Staff
#2
if you use hosting control panel, like cPanel, you should just follow the way to enable pagespeed as you like when Apache mod_pagespeed is used.
without Apache mod_pagespeed related directive, vhosts configured through Apache configuration file wont have pagespeed enabled.
Page speed is very slow, it is better to have it "unplugged" by default, only turn it on via vhost include for sites need that.
 

Hedloff

Well-Known Member
#3
Yes, we use cPanel and it's possible to add mod_pagespeed and install it as and EA4 Custom Module.
So we have to do that first?

Yes, that's why we only would like to add it in customers .htaccess file for those sites that need it.
 

Pong

Administrator
Staff member
#4
yes, you can install ea-apache24-mod_pagespeed module, it add configuration under /etc/apache2/conf.modules.d/456_pagespeed.conf.
to do it on virtual host level only, just use virtualhost include file.
 

wanah

Well-Known Member
#5
Using a virtualhost include file is not manageable. We would need it to work directly in a .htaccess file.
We haven't updated to 5.2 yet so can't test. Would this work ? :
Code:
<IfModule pagespeed_module>
    ModPagespeed on
    ModPagespeedEnableFilters rewrite_css,combine_css
    ModPagespeedEnableFilters recompress_images
    ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
    ModPagespeedEnableFilters collapse_whitespace,remove_comment
</IfModule>
 

wanah

Well-Known Member
#7
Ok, will it work in combination with LiteSpeed Cache ? (will it cache the optimised version in Litespeed's cache so that with LiteMage and WordPress LiteSpeed cache there would be almost no penalty for using it ?).
If so, do you plan on adding Pagespeed options to the cache plugins to make it easy to configure for end users ?
 

Michael A

Administrator
Staff member
#9
Hi Crazy Serb,

I don't think it is available through autoupdate yet but should be soon, just fitting in some QUIC improvements before then. If you'd like to upgrade early, you can always do so with command

Code:
lsws/admin/misc/lsup.sh -f -v 5.2
 

bobykus

Well-Known Member
#10
This way module is enabled for all web sites, right? Its not a best idea, so how to disable it by default but let enable pagespeed per web site lets say via .htaccess? Is it even possible? BTW pagespeed breaking javascript minification for some sites.
Doing

LoadModule pagespeed_module /usr/local/lsws/modules/modpagespeed.so
ModPagespeedFileCachePath /tmp/lshttpd/pagespeed/cache/
ModPagespeed On


in httpd.conf (if you are using apache style configs) will enable pagespeed for all! No metter you set in .htaccess! Beware!
 
Last edited:

Jon K

Administrator
Staff member
#11
You can make it so httpd.conf/Server level is `ModPagespeed Off` then in .htaccess have `ModPagespeed On` it will only turn it on for that vhost.
 
#15
Hello Lisa

I have installed the PageSpeed module without problems. Thanks

But with any PageSpeed settings enabled (and only ModPagespeed on) the site is broken. i have tested in some websites, including a Wordpress website with LSCache and others without LSCache. In all websites happens the same thing, the ModPagespeed breaks the page.

If you want I can send you a private message to login into the server. Thanks
 

Deepblue

Active Member
#19
I have a forum page which loads in 1.9 s without mod_pagespeed enabled and it loads around 3.8 - 4s with mod_pagespeed enabled.
Is that normal ?
 
Top