Skip to content

Selah.

Pause, and calmly think on that.

Menu
  • About
  • Chords
  • Free Gift
  • Highlights
  • Links
  • Microposts
  • The New Covenant
  • The Small Web
Menu

How to Install mod_pagespeed on CentOS

Posted on August 2, 2014August 4, 2014 by Shovas

I was introduced to Google’s mod_pagespeed at my current place of employment. I dismissed it at first until I was tasked with adding it to one of our existing web apps that didn’t have it yet. Wow. KeepAlive + mod_pagespeed is fantastic. I know KeepAlive is old but it’s still off by default in Apache’s HTTPd config and, all by itself, it gives you a 3x savings in some cases I’ve tried. That, and mod_pagespeed brings you stuff like auto-bundling certain css and javascript into a single request, minifying javascript files and inline javascript, compressing images, generating optimized/rescaled images based on IMG tag width/height, etc. and it goes on. It’s a brilliant “best of breed” (forgive me for saying that!) compilation of all the best web performance techniques. Here’s how to install it…

This is really basic. It’s almost plug’n’play. Go to the mod_pagespeed download page and grab the latest stable version package. Then run `rpm -i mod-pagespeed-stable_current_x86_64.rpm` to install it. It will install a yum repository and all the files and conf needed for mod_pagespeed itself. Then run `service httpd graceful` to restart Apache HTTPd.

Now, open your browser and, before you do anything, open the network console. Then visit one your web pages. The first request will look normal. Pagespeed is analyzing the request the first time. This’ll happen every time you restart httpd I believe.

One last thing. When developing you’ll often want to clear Pagespeed’s cache of files or else your changed files won’t appear for you. Here’s how: run `touch /var/cache/pagespeed/cache.flush`.

By the way, one thing pagespeed allows is for developers, testers and the production environment to have the full, unminified versions of css and javascript meaning developers can turn off pagespeed and, when errors occur in the browser console, you can easily go to the line of the file with the error.

Good luck! Hope you love the change as much as I did!

Comment Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.

Loading ...

No more microposts.

  • Re: Engine stall fix: Citroën 2.0 HDI 150
  • Answering Anti-Flood Objections: The Genesis Flood For Kids (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Bee Beginnings Baffle Biology Boffins (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Solving the mystery of the DEVIL’S CORKSCREW (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Witnessing the time of DRAGONS – What dinosaur behaviours did humans experience before the flood? (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Fire & Ice: The surprising story of the Bandera Volcano Ice Cave (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Humans before plants? Why Genesis does not contradict itself. (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Ancient Artwork Shows Jerusalem Left Unscathed (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Reading: Not a happy accident (Creation Magazine Summer 2026 Vol. 48 No. 3)
  • Creation Focus News And Views (Creation Magazine 2026 Vol. 48 No. 3)

bible canada centos christ christian christmas church creation Creation Magazine evolution faith family game genesis God gog good google government heart iracing jesus life linux love matthew music pc poem poetry quote racing romantical salvation science sim sin Small Web Smallweb Finds truth update video windows word YouTube

Log in
© 2026 Selah. | Powered by Superbs Personal Blog theme