How to: Install mod_pagespeed in cpanel
How to: Install mod_pagespeed in cpanel
Login to the server via SSH
Go to below folder
cd /usr/local/src
create directory
mkdir mod_pagespeed
Download pagespeed rpm
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.rpm
Extract the rpm
rpm2cpio mod-pagespeed-beta_current_i386.rpm | cpio -idmv
Copy the modules to apache modules folder
cp /usr/local/src/mod-pagespeed/usr/lib/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/
cp /usr/local/src/mod-pagespeed/etc/httpd/conf.d/pagespeed.conf /usr/local/apache/conf/
Provide execute permission
chmod 755 /usr/local/apache/modules/mod_pagespeed.so
Create below folders
mkdir /var/mod_pagespeed/{cache,files} -p
Provide correct ownership
chown nobody:nobody /var/mod_pagespeed/*
mod_pagespeed has a dependency that you’ll want to enable: mod_deflate (the httpd source directory (2.2.16) may vary depending on your install):
/usr/local/apache/bin/apxs -c -i /home/cpeasyapache/src/httpd-2.2.16/modules/filters/mod_deflate.c
We have to edit mod_pagespeed configuration file located at /usr/local/apache/conf/pagespeed.conf to reflect the correct paths, the LoadModule directives should fetch the modules in “modules/module_name.so”
LoadModule pagespeed_module modules/mod_pagespeed.so
LoadModule deflate_module modules/mod_deflate.so
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"
After that, we’ll need to include the mod_pagespeed configuration in Apache’s configuration file (/usr/local/apache/conf/httpd.conf):
Include conf/pagespeed.conf
In order to keep the changes permanant run the command below.
/usr/local/cpanel/bin/apache_conf_distiller –update
Now restart apache service.
-
Recent
- Top command in batch mode
- Malware on Linux Server (Maldet)
- The script to kill DoS/DDoS botnet on the OpenVZ hardware node
- How to set limit to remove the Frozen Maiils Automatically ?
- Script to catch malicious perl scipts uploaded to /tmp
- Exploit Removal Guide
- Frozen messages with Exim
- DDOs Commands
- SERVER LOAD TWEAKS…APACHE/MYSQL/SMTP-POP3/EXIM/IMAP
- Change Theme Without Login To WordPress Admin Area
- How do I find out zombie process?
- Command to check mod_pagespeed
-
Links
-
Archives
- March 2013 (1)
- February 2013 (8)
- January 2013 (2)
- December 2012 (7)
- November 2012 (24)
- October 2012 (44)
- September 2012 (10)
- August 2012 (13)
- July 2012 (8)
- June 2012 (5)
- May 2012 (44)
- April 2012 (8)
-
Categories
- Apache
- Cloud Linux
- Computers & Electronic
- Control Panel
- CPanel / WHM
- Education
- Enertainment
- fashion
- File Sharing
- Firefox
- Gadgets
- Games
- General
- Graphics & Design
- Health
- Hot Shot
- Humor
- Icons
- Installation
- Internet
- Iphone
- Laptops
- Linux
- Mega Projects
- Microsoft
- Mobile News
- Mobile Phones
- MySql
- PHP
- Plesk
- Portable Softwares
- Reviews
- Security
- Social Media
- Software & Utilities
- SolusVM
- Sports Channels
- Technology
- Thoughts
- Tips & Tricks
- Uncategorized
- Wallpapers
- Web 2.0
- WHM Plugins
- Windows
- Wordpress
- YouTube
-
RSS
Entries RSS
Comments RSS