Stop worrying about your server.

cPanel/Plesk Server Management for just $59/mo with Unlimited tickets, Unlimited admin hours, Security audits, 24×7 monitoring and lot more 

cPanel Server Management  $59/mo Click here

Plesk Server Management $59/mo Click here

Install mod pagespeed on cPanel server:

You will be able to install mod pagespeed on your cPanel server by following the steps that we have mentioned below,

Step 1.

At first you need to access SSH as root user.

Step 2.

Navigate to the following directory

cd /usr/local/src

Step 3.

Now you need to create a directory called pagespeed and enter into the directory using the following commands,

mkdir mod_pagespeed

cd mod_pagespeed

Step 4.

After that you need to download the RPM for building up pagespeed. Here the most important thing is, the RPM that you are going to download should match the architecture of your Operating system.

To find the architecture of your operating system, you can use the command,

uname -i

After that download mod_pagespeed RPM from the link below,

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm

rpm2cpio mod-pagespeed-stable_current_x86_64.rpm | cpio -idmv

Step 5.

Now, copy the so file “pagespeed.so” to the apache modules directory,

cp usr/lib64/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/

Step 6.

Next, change the permissions for mod_pagespeed.so file,

chmod 755 /usr/local/apache/modules/mod_pagespeed.so

mkdir -p /var/mod_pagespeed/{cache,files}

chown nobody.nobody /var/mod_pagespeed/*

Step 7.

Open the pagespeed configuration file,

vi /usr/local/apache/conf/pagespeed.conf 

LoadModule pagespeed_module /usr/local/apache/modules/mod_pagespeed.so

ModPagespeed on
ModPagespeedFetchWithGzip on
SetOutputFilter DEFLATE

AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html

ModPagespeedFileCachePath “/var/mod_pagespeed/cache/”
ModPagespeedGeneratedFilePrefix “/var/mod_pagespeed/files/”

ModPagespeedRewriteLevel PassThrough

ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImageInlineMaxBytes 2048
ModPagespeedCssImageInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000

ModPagespeedEnableFilters extend_cache,combine_css,move_css_to_head,rewrite_javascript,rewrite_images,add_head,rewrite_css,collapse_whitespace,remove_comments,remove_quotes,sprite_images,convert_meta_tags
ModPagespeedRespectVary on

SetHandler mod_pagespeed_beacon

Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_statistics

Step 8.

Just make a backup of apache configuration file and edit the current configuration file to add pagespeed configuration,

cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_back

vi /usr/local/apache/conf/httpd.conf

Include “/usr/local/apache/conf/pagespeed.conf”

Add the above line to the current Apache configuration file.

Step 9.

The last step is to restart the httpd service,

/etc/init.d/httpd restart

The module will be added now.

If you need our help to fix any issues on your server. Please feel free to contact us, simply email to [email protected]

Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59 

[sep][/sep][button size=”large” color=”green” title=”Server Management from iServersupport” link=”http://iserversupport.com/cpanel-server-management/”]Server Management at just $59[/button]