How to install and configure mod_pagespeed Apache module on CentOS 7 server step by step guide



Install and configure mod_pagespeed on linux |In this article we learn what is mod_pagespeed and how to install and configure mod_pagespeed on centos ,rhel linux  server.

What is mod_pagespeed?

Mod_pagespeed is an apache module which is used to boost up php script by eliminating compilation time of php scripts by caching compiled code into its memory and at the run time compiled code loads the php script directly from the memory to enhance the speed of the php application.

Installation of mod_pagespeed on centos server

Before installation of mod_pagespeed we need to install at package.To install at package we need to execute the below command.

#yum install at

After installing ata package we are going to install mod_pagespeed apache module using the below command.

--2019-01-07 20:56:56--  https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
Resolving dl-ssl.google.com (dl-ssl.google.com)... 74.125.24.190, 74.125.24.93, 74.125.24.136, ...
Connecting to dl-ssl.google.com (dl-ssl.google.com)|74.125.24.190|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7607004 (7.3M) [application/x-redhat-package-manager]
Saving to: ‘mod-pagespeed-stable_current_x86_64.rpm’

100%[======================================>] 7,607,004    265KB/s   in 33s

2019-01-07 20:57:30 (226 KB/s) - ‘mod-pagespeed-stable_current_x86_64.rpm’ saved [7607004/7607004]

[root@localhost ~]# rpm -ivh mod-pagespeed-stable_current_x86_64.rpm
warning: mod-pagespeed-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mod-pagespeed-stable-1.13.35.2-0 ################################# [100%]
Redirecting to /bin/systemctl start atd.service
job 1 at Mon Jan  7 21:01:00 2019

Configuration file and module location of mod_pagespeed

main configuration file  located at “/etc/httpd/conf.d/pagespeed.conf”.
How to install and configure mod_pagespeed Apache module on CentOS 7 server step by step guide
How to install and configure mod_pagespeed Apache module on CentOS 7 server step by step guide


module is located at “/usr/lib/httpd/modules/mod_pagespeed.so”.

Configure mod_pagespeed on centos server

By default mod_pagespeed module is enabled . config screenshot as below.
<IfModule pagespeed_module>
    # Turn on mod_pagespeed. To completely disable mod_pagespeed, you
    # can set this to "off".
    ModPagespeed on
 To disable it we need to change the  ModPagespeed parameter from on to off.
    ModPagespeed off


We can select different level of setting from the config file. The default level is corefilters.

We can enable and disable filter using the ModPagespeedEnableFilters and ModPagespeedDisable 
Filters directives.

Thats all.If this article is helpful to install and configure mod_pagespeed module please share it!




SHARE

Admin

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment