Ispmanager 6 lite, pro, host documentation

PageSpeed Module

 

Note
In the current version of ispmanager, the module is not supported for the OpenLiteSpeed web server.

PageSpeed module automatically optimizes website pages and speeds up their loading. To install the module, enable the PageSpeed Module option when installing the web server. Ispmanager installs separate versions of the module for Apache and Nginx. Read more in Install a web-server.

If you are using the Nginx web server, starting with ispmanager 6.107, when you install PageSpeed, the web server will be updated to ispmanager own Nginx build. To learn more, read the article Install a web server.

For the web server to use the module for website pages, enable the PageSpeed Module option in the website settings. Read more in Add a website.

If you use custom Nginx templates, add the following lines to /usr/local/mgr5/etc/templates/nginx-vhosts.template and /usr/local/mgr5/etc/templates/nginx-vhosts-ssl.template to activate the module:

{% if $PAGESPEED == on %}
        include {% $NGINX_MODULE_PAGESPEED_PATH %};
{% endif %}

Ispmanager uses default module configurations. You can change module settings through configuration files. Read more in the official module documentation.

Note.
An error in the module configuration may cause the web server to become inoperable. We do not recommend changing the configuration files unless you are absolutely sure.

Module configuration for Nginx

Module configuration file — /etc/nginx/conf.d/pagespeed.conf.

The contents of the default configuration file:

pagespeed off;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed FileCacheSizeKb 102400;
pagespeed FileCacheCleanIntervalMs 3600000;
pagespeed FileCacheInodeLimit 500000;

When enabling a module for the website, a string is added to the Nginx configuration file for the WWW domain:

include /etc/nginx/modules-includes/pagespeed/*.conf;

This string connects the configuration file /etc/nginx/modules-includes/pagespeed/pagespeed.conf with the following content:

pagespeed on;

location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
  add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

Module configuration for Apache

Module configuration files:

  • for Debian, Ubuntu — /etc/apache2/mods-enabled/pagespeed.conf, /etc/apache2/mods-enabled.pagespeed.load;
  • for AlmaLinux — /etc/httpd/conf.d/pagespeed.conf.

The main parameters of the default configuration file:

ModPagespeed off
ModPagespeedFileCachePath "/var/cache/mod_pagespeed/"
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedFileCacheInodeLimit 500000

When enabling a module for the website, a string is added to the Apache configuration file for the WWW domain:

<IfModule pagespeed_module>
    ModPagespeed on
</IfModule>