CAll Us: +91 88 00 563434   Login

What is mod_pagespeed and how to enable it?

You are here:
< All Topics

What’s mod_pagespeed and tips on how to allow it?

 

PageSpeed (mod_pagespeed) is a module for OpenLiteSpeed webserver, to hurry up our web sites on the server. PageSpeed module will pace up your web sites by making use of filters to recordsdata with a purpose to scale back the variety of requests from browsers to our server. It additionally reduces the scale of the recordsdata and for optimizing the requests the recordsdata will likely be cached. The one draw back of PageSpeed module is that generally it makes use of rather more assets on servers. Let’s talk about a number of the advantages of PageSpeed modules briefly:

1) Minifies or compress exterior CSS and JavaScript.

2) It additionally combines a number of exterior JS recordsdata into one JS file to cut back the http requests.

3) Optimizes the cache for the recordsdata.

4) Makes use of the thought of URL fingerprinting for the brand new JS recordsdata.

5) Minifies the HTML.

 

As we talked about on advantages this module will combines a number of JavaScripts into one file, this file will likely be saved in someplace quickly. The PageSpeed module will tells browser to retailer the JavaScript file for a very long time.

Let’s talk about concerning the set up of PageSpeed module on cPanel server:

1) Obtain and set up OpenLiteSpeed 1.4.2 or greater in case you shouldn’t have in your server as a result of PageSpeed module is on the market from OpenLiteSpeed 1.4.2

If you have already got OpenLiteSpeed 1.4.2 or greater, first it’s worthwhile to go PageSpeed Module listing by login to your server by way of SSH as root person after which execute beneath instructions.

# cd /openlitespeed_download/src/modules/pagespeed

# ./dlpsol.sh

It will set up newest PageSpeed Optimization Libraries(PSOL) supported by OpenLiteSpeed. Then we have to construct the modpagespeed.so by executing beneath command.

# make

If it throws any error whereas compiling attempt “gmake” as an alternative of “make” then transfer this dynamic module (modpagespeed.so) to LightSpeed’s module listing.

# cp modpagespeed.so /usr/native/lsws/modules

2) Then we have to arrange PageSpeed module by way of WebAdmin Console, we have to add the PageSpeed module at “WebAdmin console > Configuration > Server > Modules > Add”. Enter the module title as “modpagespeed” and default filter units with beneath parameters and save the module settings. After making essential modifications restart lightspeed webserver from console or by way of terminal.

pagespeed on

pagespeed FileCachePath /tmp/lshttpd/pagespeed

pagespeed RewriteLevel CoreFilters

The PageSpeed module could be additional configured at virtualhost degree which is able to at all times override the server level-configurations.

3) As an alternative of performing step-2, we will additionally edit the configuration file of OpenLiteSpeed by way of command line and insert beneath codes to “httpd_config.conf” file.

module modpagespeed

param <<<END_param

pagespeed on

pagespeed InPlaceResourceOptimization off

pagespeed FetchHttps allow

pagespeed FileCachePath /tmp/lshttpd/pagespeed/

pagespeed EnableFilters remove_comments

pagespeed EnableFilters local_storage_cache

pagespeed EnableFilters extend_cache_pdfs

pagespeed EnableFilters combine_css

pagespeed EnableFilters rewrite_css

pagespeed EnableFilters extend_cache,rewrite_images

pagespeed EnableFilters rewrite_javascript

#pagespeed FileCacheSizeKb 102400

#pagespeed FileCacheCleanIntervalMs 3600000

#pagespeed FileCacheInodeLimit 500000000

pagespeed FetcherTimeoutMs 5000

#pagespeed ModifyCachingHeaders off

#pagespeed MapProxyDomain http://127.0.0.1:8088/ http://ref.pssdemos.com/

#pagespeed RunExperiment on

#pagespeed EnableFilters inline_images

#pagespeed LoadFromFile https://127.0.0.1:7080 /usr/lsws/lsws/admin/html/

#pagespeed LoadFromFile https://127.0.0.1:8088 /usr/native/lsws/Instance/html/

END_param

 

In the event you want any additional assist, please attain our assist division.

Knowledge Base