mod_pagespeed in 5.2

Discussion in 'General' started by Hedloff, Jul 11, 2017.

  1. Hedloff

    Hedloff Well-Known Member

    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/ ?
     
  2. mistwang

    mistwang LiteSpeed Staff

    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.
     
  3. Hedloff

    Hedloff Well-Known Member

    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.
     
  4. Pong

    Pong Well-Known Member Staff Member

    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.
     
  5. wanah

    wanah Well-Known Member

    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>
     
  6. mistwang

    mistwang LiteSpeed Staff

    It should work the same way as if Apache is used.
     
  7. wanah

    wanah Well-Known Member

    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 ?
     
  8. Crazy Serb

    Crazy Serb Member

    Is this available in latest cPanel yet (Litespeed 5.2 and Pagespeed?)
     
  9. Michael A

    Michael A Administrator Staff Member

    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
     
  10. bobykus

    bobykus Well-Known Member

    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: Aug 16, 2017
  11. Jon K

    Jon K Administrator Staff Member

    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.
     
  12. Any tutorial or wiki how install and enable PageSpeed in LSWS 5.2 ?

    Thanks
     
  13. lclarke

    lclarke Administrator

    tropicalserver likes this.
  14. Hi Lisa

    I'm sorry, I had not seen it.

    Thanks!
     
    lclarke likes this.
  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
     
  16. lclarke

    lclarke Administrator

    I'm not the resident pagespeed expert around here, but if you want to send me your credentials, I can pass them along.
    Alternately, you could open a ticket.
     
  17. Ok, I will open a ticket, thank you
     
  18. lclarke

    lclarke Administrator

    You're very welcome!
     
  19. Deepblue

    Deepblue Active Member

    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 ?
     

Share This Page