Apache2 module PageSpeed

Discussion in 'Tips/Tricks/Mods' started by concept21, Aug 16, 2021.

  1. concept21

    concept21 Active Member

    Have you tried web server module PageSpeed?

    I have installed this on my Ubuntu 20.04.2 apache2 server. It runs well without any error, but I am not sure whether it contributes performance gain. What are your experiences? :rolleyes:

    These are my setting in file /etc/apache2/mod-available/pagespeed.conf
    ModPagespeedDomain www.mydomain.tld
    ModPagespeedLoadFromFile "http://www.mydomain.tld/" "/var/www/mydomain.tld/web/"
    ModPagespeedMemcachedServers localhost:11211

    If you want to access pagespeed control panel, firstly install lynx. Then, run in a console:
    lynx http://localhost/pagespeed_admin

    What do you find? :oops:
  2. ahrasis

    ahrasis Well-Known Member

    Based on my experience, you don't need that.
  3. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Some of the biggest factors in page speed (I assume you mean load speed) are the loading of sources to include in the page.

    Scripts, CSS, images are the things to look at.

    The first things you might want to consider is using distributed CDN's to load these from as well as using non-blocking requests (multiple requests able to run at the same time to speed up load time). The CDN's should all be cookie-less domains, this means essentially nothing running on the host that will create any sort of cookie.

    Another things to look at is when you load images, You can speed up the initial page load by loading images after the initial page load. You can search for load images after initial page load.

    I hope I have given you a good start point here.
    concept21 and ahrasis like this.
  4. Steini86

    Steini86 Active Member

    I used it in the past but apart from theoretical benchmarks I could not see a difference. And it made a lot of problems. Upgrades drove me nuts, Nextcloud is not compatible and I ended up disabled it for most sites, so I decided to ditch it all together.
    It was started by Google but is now one of the tons of abandoned Google projects. I would not use it in a production environment. The community tried to keep it alive but there are more problems than solutions. Read this and decide for yourself: https://github.com/apache/incubator-pagespeed-ngx/issues/1678
    ahrasis likes this.
  5. concept21

    concept21 Active Member

    My experience of mod_pagespeed is quite positive.
    If I enable it, my web gets Grade A GTmetric and Grade B if I disable mod_pagespeed.

    I also find one important point. You must set this correctly in pagespeed.conf:
    ModPagespeedLoadFromFile "http://www.domain.tld/" "/var/www/domain.tld/web/"

    If you put "http://www.domain.tld/" as "https://www.domain.tld/", it will break this module's function. Your web will load slower.
    Jesse Norell likes this.
  6. ahrasis

    ahrasis Well-Known Member

    I don't use it at all and still get A, for all my websites, so again, there is no need to use it. I am using nginx but I don't think apache2 would make any difference especially to simply score A as you just mentioned.
  7. concept21

    concept21 Active Member

    I have tested pagespeed on Nginx. The library psol does not exit any more. Nginx fans can skip pagespeed altogether. :cool:
    ahrasis likes this.

Share This Page