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!

CommentCancel reply

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

Loading ...

No more microposts.

  • YouTube Finds: 10 Second Clips Of Every MS DOS Game Ever
  • Smallweb Finds: PlaintextSports.com
  • Smallweb Finds: Rectangles.app
  • Fractal Patterns: Activation Energy is a good model for a lot of things
  • YouTube Finds: The Male Gaze Doesn’t Exist: Knight’s Path, Stellar Blade, And 40 Years Of Data
  • AI can now read ‘by sight’ and write ‘by hand’ very capably when generating or reading images
  • Grok imagines my arch nemesis based on my X posts
  • Smallweb Finds: Vole.wtf Clutter Site
  • Smallweb Finds: The average visitor to this website clicks the coin box 58 times
  • Smallweb Finds: The Obscuritory – For Games Unplayed and Unknown

bible canada centos christ christian christmas church creation evolution faith family game genesis God gog good google government heart iracing jesus life linux lord 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