{ "created": "2015-12-20T19:56:38Z", "hierarchy": [ { "name": "ROOT", "type": "folder", "uri": "/ROOT" }, { "name": "Mod-pagespeed Notes", "type": "article", "uri": "Mod-pagespeed_Notes" } ], "html": "\n\n \n \n \n \n \n \n \n \n \n \n \n Mod-pagespeed Notes – Nikhil's Personal Wiki\n \n \n \n \n \n
\n
\n \n
\n
\n \n \n\n

Mod-pagespeed Notes\n \n

\n

In this guide, I’ll be installing mod_pagespeed on a 64-bit CentOS 5.5
\nsystem. The host is example.com.

\n

Installation

\n

Grab the most appropriate RPM
\nand install it.

\n
rpm -ivh https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm\n
\n

This is the RPM manifest on a 64-bit system:

\n
/etc/cron.daily/mod-pagespeed  \n/etc/httpd/conf.d/pagespeed.conf  \n/usr/lib64/httpd/modules/mod_pagespeed.so  \n/var/www/mod_pagespeed/cache  \n/var/www/mod_pagespeed/files\n
\n

Testing

\n

To check for a proper install, you can do two things:

\n\n

Checking headers

\n

Let’s use wget:

\n
wget -O - --server-response http://example.com/home/index.php > /dev/null \n
\n

Here’s the response:

\n
--2011-01-05 09:01:36--  http://example.com/home/index.php\nResolving example.com... 128.255.22.132\nConnecting to example.com|128.255.22.132|:80... connected.\nHTTP request sent, awaiting response... \n  HTTP/1.1 200 OK\n  Date: Wed, 05 Jan 2011 15:01:36 GMT\n  Server: Apache/2.2.3 (CentOS)\n  X-Powered-By: PHP/5.2.10\n  X-Mod-Pagespeed: 0.9.11.5-293\n  Vary: Accept-Encoding\n  Content-Length: 4657\n  Connection: close\n  Content-Type: text/html; charset=UTF-8\nLength: 4657 (4.5K) [text/html]\nSaving to: `STDOUT'\n\n100%[========================================>] 4,657       --.-K/s   in 0s      \n\n2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657]\n
\n

The X-Mod-Pagespeed header should tell you that pagespeed is in
\naction.

\n

Tweaking Pagespeed

\n

Pagespeed has 18 ‘filters’ with which you can tweak for performance. For
\nexample, I can remove all HTML comments with this filter in
\n/etc/httpd/conf.d/pagespeed.conf

\n
ModPagespeedEnableFilters remove_comments\n
\n

To see a “before-and-after”, append ?ModPagespeed=off to any page
\nserved up. This page does a good job of
\nexplaining other filters. You can also check the documentation.

\n

Viewing statistics

\n

The /etc/httpd/conf.d/pagespeed.conf config defines
\n/mod_pagespeed_statistics as a page where you can take a look at
\npagspeed’s statistics.

\n

Sources

\n\n\n\n
\n \n
\n \n \n \n \n \n\n", "id": "5453e2c1-ffb2-56e2-8a68-21348268c1c1", "modified": "2023-05-03T20:33:13Z", "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2023-05-03T20:33:13Z", "id": "13fd9aa2c17070823012a12dd946d050e3ed6bf3", "shortId": "13fd9aa2", "subject": "Initial commit\n", "content": "In this guide, I'll be installing `mod_pagespeed` on a 64-bit CentOS 5.5\nsystem. The host is `example.com`.\n\nInstallation\n------------\n\nGrab [the most appropriate RPM](http://code.google.com/speed/page-speed/download.html)\nand install it.\n\n rpm -ivh https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm\n\nThis is the RPM manifest on a 64-bit system:\n\n /etc/cron.daily/mod-pagespeed \n /etc/httpd/conf.d/pagespeed.conf \n /usr/lib64/httpd/modules/mod_pagespeed.so \n /var/www/mod_pagespeed/cache \n /var/www/mod_pagespeed/files\n\nTesting\n-------\n\nTo check for a proper install, you can do two things:\n\n* Check if the `/var/www/mod_pagespeed` directories are populated, or\n* Use `curl` or `wget` to check for the appropriate header.\n\n### Checking headers\n\nLet's use `wget`:\n\n wget -O - --server-response http://example.com/home/index.php > /dev/null \n\nHere's the response:\n\n --2011-01-05 09:01:36-- http://example.com/home/index.php\n Resolving example.com... 128.255.22.132\n Connecting to example.com|128.255.22.132|:80... connected.\n HTTP request sent, awaiting response... \n HTTP/1.1 200 OK\n Date: Wed, 05 Jan 2011 15:01:36 GMT\n Server: Apache/2.2.3 (CentOS)\n X-Powered-By: PHP/5.2.10\n X-Mod-Pagespeed: 0.9.11.5-293\n Vary: Accept-Encoding\n Content-Length: 4657\n Connection: close\n Content-Type: text/html; charset=UTF-8\n Length: 4657 (4.5K) [text/html]\n Saving to: `STDOUT'\n \n 100%[========================================>] 4,657 --.-K/s in 0s \n \n 2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657]\n\nThe `X-Mod-Pagespeed` header should tell you that pagespeed is in\naction.\n\nTweaking Pagespeed\n------------------\n\nPagespeed has 18 'filters' with which you can tweak for performance. For\nexample, I can remove all HTML comments with this filter in\n`/etc/httpd/conf.d/pagespeed.conf`\n\n ModPagespeedEnableFilters remove_comments\n\nTo see a \"before-and-after\", append `?ModPagespeed=off` to any page\nserved up. [This page](http://www.modpagespeed.com/) does a good job of\nexplaining other filters. You can also check the documentation.\n\n### Viewing statistics\n\nThe `/etc/httpd/conf.d/pagespeed.conf` config defines\n`/mod_pagespeed_statistics` as a page where you can take a look at\npagspeed's statistics.\n\nSources\n-------\n\n* [Installing mod\\_pagespeed on CentOS (cPanel/WHM)](https://fusi0n.org/linux/installing-googles-mod_pagespeed-on-centos-with-cpanel-and-whm)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-27T07:27:56Z", "id": "5a5b1a32f41081d062ab86f8869a961bcad79668", "shortId": "5a5b1a32", "subject": "Fix Markdown conversion\n\nSaw half a season of The Office\n", "content": "In this guide, I'll be installing `mod_pagespeed` on a 64-bit CentOS 5.5\nsystem. The host is `example.com`.\n\nInstallation\n------------\n\nGrab [the most appropriate RPM](http://code.google.com/speed/page-speed/download.html)\nand install it.\n\n rpm -ivh https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm\n\nThis is the RPM manifest on a 64-bit system:\n\n /etc/cron.daily/mod-pagespeed \n /etc/httpd/conf.d/pagespeed.conf \n /usr/lib64/httpd/modules/mod_pagespeed.so \n /var/www/mod_pagespeed/cache \n /var/www/mod_pagespeed/files\n\nTesting\n-------\n\nTo check for a proper install, you can do two things:\n\n* Check if the `/var/www/mod_pagespeed` directories are populated, or\n* Use `curl` or `wget` to check for the appropriate header.\n\n### Checking headers\n\nLet's use `wget`:\n\n wget -O - --server-response http://example.com/home/index.php > /dev/null \n\nHere's the response:\n\n --2011-01-05 09:01:36-- http://example.com/home/index.php\n Resolving example.com... 128.255.22.132\n Connecting to example.com|128.255.22.132|:80... connected.\n HTTP request sent, awaiting response... \n HTTP/1.1 200 OK\n Date: Wed, 05 Jan 2011 15:01:36 GMT\n Server: Apache/2.2.3 (CentOS)\n X-Powered-By: PHP/5.2.10\n X-Mod-Pagespeed: 0.9.11.5-293\n Vary: Accept-Encoding\n Content-Length: 4657\n Connection: close\n Content-Type: text/html; charset=UTF-8\n Length: 4657 (4.5K) [text/html]\n Saving to: `STDOUT'\n \n 100%[========================================>] 4,657 --.-K/s in 0s \n \n 2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657]\n\nThe `X-Mod-Pagespeed` header should tell you that pagespeed is in\naction.\n\nTweaking Pagespeed\n------------------\n\nPagespeed has 18 'filters' with which you can tweak for performance. For\nexample, I can remove all HTML comments with this filter in\n`/etc/httpd/conf.d/pagespeed.conf`\n\n ModPagespeedEnableFilters remove_comments\n\nTo see a \"before-and-after\", append `?ModPagespeed=off` to any page\nserved up. [This page](http://www.modpagespeed.com/) does a good job of\nexplaining other filters. You can also check the documentation.\n\n### Viewing statistics\n\nThe `/etc/httpd/conf.d/pagespeed.conf` config defines\n`/mod_pagespeed_statistics` as a page where you can take a look at\npagspeed's statistics.\n\nSources\n-------\n\n* [Installing mod\\_pagespeed on CentOS (cPanel/WHM)](https://fusi0n.org/linux/installing-googles-mod_pagespeed-on-centos-with-cpanel-and-whm)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-21T02:30:47Z", "id": "3f2c54b1d767218fcb4855fbac306b015afaf551", "shortId": "3f2c54b1", "subject": "Incremental\n", "content": "In this guide, I'll be installing `mod_pagespeed` on a 64-bit CentOS 5.5\nsystem. The host is `example.com`.\n\nInstallation\n------------\n\nGrab [the most appropriate\nRPM](http://code.google.com/speed/page-speed/download.html) and install\nit.\n\n` rpm -ivh `[`https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm`](https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm)\n\nThis is the RPM manifest on a 64-bit system:\n\n` /etc/cron.daily/mod-pagespeed` \n` /etc/httpd/conf.d/pagespeed.conf` \n` /usr/lib64/httpd/modules/mod_pagespeed.so` \n` /var/www/mod_pagespeed/cache` \n` /var/www/mod_pagespeed/files`\n\nTesting\n-------\n\nTo check for a proper install, you can do two things:\n\n- Check if the `/var/www/mod_pagespeed` directories are populated, or\n- Use `curl` or `wget` to check for the appropriate header.\n\n### Checking headers\n\nLet's use `wget`:\n\n` wget -O - --server-response `[`http://example.com/home/index.php`](http://example.com/home/index.php)` > /dev/null `\n\nHere's the response:\n\n` --2011-01-05 09:01:36--  `[`http://example.com/home/index.php`](http://example.com/home/index.php) \n` Resolving example.com... 128.255.22.132` \n` Connecting to example.com|128.255.22.132|:80... connected.` \n` HTTP request sent, awaiting response... ` \n`   HTTP/1.1 200 OK` \n`   Date: Wed, 05 Jan 2011 15:01:36 GMT` \n`   Server: Apache/2.2.3 (CentOS)` \n`   X-Powered-By: PHP/5.2.10` \n`   `**`X-Mod-Pagespeed:` `0.9.11.5-293`** \n`   Vary: Accept-Encoding` \n`   Content-Length: 4657` \n`   Connection: close` \n`   Content-Type: text/html; charset=UTF-8` \n` Length: 4657 (4.5K) [text/html]` \n``  Saving to: `STDOUT' `` \n` ` \n` 100%[========================================================================================>] 4,657       --.-K/s   in 0s      ` \n` ` \n``  2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657] ``\n\nThe `X-Mod-Pagespeed` header should tell you that pagespeed is in\naction.\n\nTweaking Pagespeed\n------------------\n\nPagespeed has 18 'filters' with which you can tweak for performance. For\nexample, I can remove all HTML comments with this filter in\n`/etc/httpd/conf.d/pagespeed.conf`\n\n`  ModPagespeedEnableFilters remove_comments`\n\nTo see a \"before-and-after\", append `?ModPagespeed=off` to any page\nserved up. [This page](http://www.modpagespeed.com/) does a good job of\nexplaining other filters. You can also check the documentation.\n\n### Viewing statistics\n\nThe `/etc/httpd/conf.d/pagespeed.conf` config defines\n`/mod_pagespeed_statistics` as a page where you can take a look at\npagspeed's statistics.\n\nSources\n-------\n\n- [Installing mod\\_pagespeed on\n CentOS (cPanel/WHM)](https://fusi0n.org/linux/installing-googles-mod_pagespeed-on-centos-with-cpanel-and-whm)\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-20T19:56:38Z", "id": "cf8cfbc180c2283a41a6e566e4346ef691661aa6", "shortId": "cf8cfbc1", "subject": "Mod-pagespeed Notes : First Draft", "content": "In this guide, I'll be installing `mod_pagespeed` on a 64-bit CentOS 5.5\nsystem. The host is `example.com`.\n\nInstallation\n------------\n\nGrab [the most appropriate\nRPM](http://code.google.com/speed/page-speed/download.html) and install\nit.\n\n` rpm -ivh `[`https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm`](https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm)\n\nThis is the RPM manifest on a 64-bit system:\n\n` /etc/cron.daily/mod-pagespeed` \n` /etc/httpd/conf.d/pagespeed.conf` \n` /usr/lib64/httpd/modules/mod_pagespeed.so` \n` /var/www/mod_pagespeed/cache` \n` /var/www/mod_pagespeed/files`\n\nTesting\n-------\n\nTo check for a proper install, you can do two things:\n\n- Check if the `/var/www/mod_pagespeed` directories are populated, or\n- Use `curl` or `wget` to check for the appropriate header.\n\n### Checking headers\n\nLet's use `wget`:\n\n` wget -O - --server-response `[`http://example.com/home/index.php`](http://example.com/home/index.php)` > /dev/null `\n\nHere's the response:\n\n` --2011-01-05 09:01:36--  `[`http://example.com/home/index.php`](http://example.com/home/index.php) \n` Resolving example.com... 128.255.22.132` \n` Connecting to example.com|128.255.22.132|:80... connected.` \n` HTTP request sent, awaiting response... ` \n`   HTTP/1.1 200 OK` \n`   Date: Wed, 05 Jan 2011 15:01:36 GMT` \n`   Server: Apache/2.2.3 (CentOS)` \n`   X-Powered-By: PHP/5.2.10` \n`   `**`X-Mod-Pagespeed:` `0.9.11.5-293`** \n`   Vary: Accept-Encoding` \n`   Content-Length: 4657` \n`   Connection: close` \n`   Content-Type: text/html; charset=UTF-8` \n` Length: 4657 (4.5K) [text/html]` \n``  Saving to: `STDOUT' `` \n` ` \n` 100%[========================================================================================>] 4,657       --.-K/s   in 0s      ` \n` ` \n``  2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657] ``\n\nThe `X-Mod-Pagespeed` header should tell you that pagespeed is in\naction.\n\nTweaking Pagespeed\n------------------\n\nPagespeed has 18 'filters' with which you can tweak for performance. For\nexample, I can remove all HTML comments with this filter in\n`/etc/httpd/conf.d/pagespeed.conf`\n\n`  ModPagespeedEnableFilters remove_comments`\n\nTo see a \"before-and-after\", append `?ModPagespeed=off` to any page\nserved up. [This page](http://www.modpagespeed.com/) does a good job of\nexplaining other filters. You can also check the documentation.\n\n### Viewing statistics\n\nThe `/etc/httpd/conf.d/pagespeed.conf` config defines\n`/mod_pagespeed_statistics` as a page where you can take a look at\npagspeed's statistics.\n\nSources\n-------\n\n- [Installing mod\\_pagespeed on\n CentOS (cPanel/WHM)](https://fusi0n.org/linux/installing-googles-mod_pagespeed-on-centos-with-cpanel-and-whm)\n\n[Category:Nikhil's Notes](Category:Nikhil's_Notes \"wikilink\")\n[Category:Installation Logs](Category:Installation_Logs \"wikilink\")\n[Category:From a past sysadmin\nlife](Category:From_a_past_sysadmin_life \"wikilink\")\n" } ], "sizeInBytes": 2519, "source": "In this guide, I'll be installing `mod_pagespeed` on a 64-bit CentOS 5.5\nsystem. The host is `example.com`.\n\nInstallation\n------------\n\nGrab [the most appropriate RPM](http://code.google.com/speed/page-speed/download.html)\nand install it.\n\n rpm -ivh https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm\n\nThis is the RPM manifest on a 64-bit system:\n\n /etc/cron.daily/mod-pagespeed \n /etc/httpd/conf.d/pagespeed.conf \n /usr/lib64/httpd/modules/mod_pagespeed.so \n /var/www/mod_pagespeed/cache \n /var/www/mod_pagespeed/files\n\nTesting\n-------\n\nTo check for a proper install, you can do two things:\n\n* Check if the `/var/www/mod_pagespeed` directories are populated, or\n* Use `curl` or `wget` to check for the appropriate header.\n\n### Checking headers\n\nLet's use `wget`:\n\n wget -O - --server-response http://example.com/home/index.php > /dev/null \n\nHere's the response:\n\n --2011-01-05 09:01:36-- http://example.com/home/index.php\n Resolving example.com... 128.255.22.132\n Connecting to example.com|128.255.22.132|:80... connected.\n HTTP request sent, awaiting response... \n HTTP/1.1 200 OK\n Date: Wed, 05 Jan 2011 15:01:36 GMT\n Server: Apache/2.2.3 (CentOS)\n X-Powered-By: PHP/5.2.10\n X-Mod-Pagespeed: 0.9.11.5-293\n Vary: Accept-Encoding\n Content-Length: 4657\n Connection: close\n Content-Type: text/html; charset=UTF-8\n Length: 4657 (4.5K) [text/html]\n Saving to: `STDOUT'\n \n 100%[========================================>] 4,657 --.-K/s in 0s \n \n 2011-01-05 09:01:36 (211 MB/s) - `-' saved [4657/4657]\n\nThe `X-Mod-Pagespeed` header should tell you that pagespeed is in\naction.\n\nTweaking Pagespeed\n------------------\n\nPagespeed has 18 'filters' with which you can tweak for performance. For\nexample, I can remove all HTML comments with this filter in\n`/etc/httpd/conf.d/pagespeed.conf`\n\n ModPagespeedEnableFilters remove_comments\n\nTo see a \"before-and-after\", append `?ModPagespeed=off` to any page\nserved up. [This page](http://www.modpagespeed.com/) does a good job of\nexplaining other filters. You can also check the documentation.\n\n### Viewing statistics\n\nThe `/etc/httpd/conf.d/pagespeed.conf` config defines\n`/mod_pagespeed_statistics` as a page where you can take a look at\npagspeed's statistics.\n\nSources\n-------\n\n* [Installing mod\\_pagespeed on CentOS (cPanel/WHM)](https://fusi0n.org/linux/installing-googles-mod_pagespeed-on-centos-with-cpanel-and-whm)\n", "title": "Mod-pagespeed Notes", "untracked": false, "uri": "/Mod-pagespeed_Notes", "relativePath": "Mod-pagespeed Notes.md" }