google_logospeedapache_logo

mod_pagespeed is the latest addition to our family of products, performing on-the-fly optimization in the Apache™ 2 HTTP Server. It provides webmasters and web developers that manage their Apache 2 configuration with technology that applies Page Speed performance best practices automatically. Webmasters can get the benefits of the optimizations without having to manually going back and fixing the performance issues that Page Speed detects.

This solution is valid if you do not want to carefully optimize your site, and it come for now at huge initial CPU costs till the cache is filled up. The load on my server has proven to be unacceptable (for me) and I was forced to switch it off. But it may work on your server depending on the page size, number of visitors. Authors are working hard and communicating a lot on the official mailing list to reduce that load and improve the code in the coming weeks

If you trust me, you can download the library module libmod_pagespeed.so for Apache 2.2

from http://drivers.waltercedric.com/

Check before installing the MD5 keys of this file

# md5sum -b mod_pagespeed.so
187995e3623a222ec5b54c331ee7ffaa *mod_pagespeed.so

If it matches, drop it into your Apache library folder /usr/lib64/apache2/

Build Apache module mod_pagespeed yourself

On my OpenSuSE system, I was forced to install first

zypper in gcc-c++

Then read  http://code.google.com/p/modpagespeed/wiki/HowToBuild

you should get after a successful build

  • ./out/Release/libmod_pagespeed.so
  • ./out/Release/install/common/pagespeed.conf

Install the module library

cp ./out/Release/libmod_pagespeed.so  /usr/lib64/apache2/mod_pagespeed.so

Configuration

After installing mod_pagespeed, it can be customized and configured by editing the Apache configuration file

/etc/apache2/conf.d/pagespeed.conf

so you can run

# cp ./out/Release/install/common/pagespeed.conf /etc/apache2/conf.d/pagespeed.conf

Create some directories

# mkdir /var/mod_pagespeed/
# mkdir /var/mod_pagespeed/cache/
# mkdir /var/mod_pagespeed/files

Has to be writtable by apache

chown -R wwwrun:www /var/mod_pagespeed/ 

and finally restart apache

 apache2ctl restart

There is a lot of available settings that are all well explained in this page http://code.google.com/speed/page-speed/docs/using_mod.html

Here is my /etc/apache2/conf.d/pagespeed.conf stripped of all comments as an example:

LoadModule pagespeed_module /usr/lib64/apache2/mod_pagespeed.so

    SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER
    ModPagespeed on

    ModPagespeedDomain www.waltercedric.com
    ModPagespeedUrlPrefix                "http://www.waltercedric.com/mod_pagespeed/"
    ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
    ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"
    ModPagespeedRewriteLevel CoreFilters
    ModPagespeedEnableFilters collapse_whitespace
    ModPagespeedEnableFilters extend_cache
    ModPagespeedEnableFilters combine_css
    ModPagespeedEnableFilters rewrite_css
    ModPagespeedEnableFilters rewrite_javascript
    ModPagespeedEnableFilters rewrite_images
    ModPagespeedEnableFilters remove_comments

# This page lets you view statistics about the mod_pagespeed module. Order allow,deny # You may insert other "Allow from" lines to add hosts you want to # allow to look at generated statistics. Another possibility is # to comment out the "Order" and "Allow" options from the config # file, to allow any client that can reach your server to examine # statistics. This might be appropriate in an experimental setup or # if the Apache server is protected by a reverse proxy that will # filter URLs in some fashion. Allow from localhost SetHandler mod_pagespeed_statistics

Troubleshooting

You may be forced to remove mod_deflate

You can disable mod_pagespeed by adding in the url  ?mod_page_speed=0

Some mod_pagespeed filters

Links

comments powered by Disqus

You might like also

Clue a command line tool for Apache Lucene search software
Lucene Core&160; is an open-source search software, provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities. Luke is a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display and modify their content. Luke is awesome, but often times it is not feasible to inspect an index on a remote machine using a GUI. That's where Clue comes in. You can SSH into your production box and …
1959 Days ago
Apache POI contribution patches
The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and …
2206 Days ago
Subversion and mod Security
I was receiving some strange errors (HTTP error 501) while committing to my public subversion (http://svn.waltercedric.com), all my problems were related to mod security This error 501 means most of the time that the client changed authentication halfway through the commit. That is, it started the commit by sending http requests with a Basic auth header of user1, and then a few requests later it sent a Basic auth header with a different user. Yes but.. …
3685 Days ago
Installing Munin on OpenSuse 11.x
&160; Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort. Using Munin you can easily monitor the performance of your computers, networks, SANs, applications, weather measurements and whatever comes to mind. It makes it easy to determine "what's different today" …
3713 Days ago
No Thumbnail was found
From http://www.mysqlperformanceblog.com Percona XtraDB includes all of InnoDB&8217;s ACID-compliant design and advanced MVCC architecture, and adds features, more tunability, more metrics, more scalability on many cores, and better memory usage. We choose features and fixes based on customer requests and on our best judgment of real-world needs. We have not included all the InnoDB patches available. For example Google&8217;s well-known InnoDB patch set is omitted (at least for now). The first version of our new storage engine is 1.0.2-1, which …
3769 Days ago
Site optimization: it's all about your image size and format
I really like this small Firefox extension Smushit as it allow to quickly check if all my images are optimized for the best size and thus speed of rendering. But wait IE/Opera/Chrome can still use this bookmarlet :-) to optimize the images found on any web page! From http://www.smushit.com/ Image optimization is an art that not many people master. There are many good image editing tools that allow us to get the best visual result for a certain file size …
3796 Days ago
No Thumbnail was found
From WikiPedia Inline linking (also known as hotlinking, leeching, piggy-backing, direct linking, offsite image grabs and bandwidth theft) is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located. This is not just Bandwidth Stealing, as It cost CPU and bandwidth which means less performance for your visitors, It cost a …
3818 Days ago
How to install mod_security 2.5.7
ModSecurityTM is an open source intrusion detection and prevention engine for web applications (or a web application firewall). Operating as an Apache Web server module or standalone, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks. from http://www.modsecurity.org/ You'll have to create a free account at https://bsn.breach.com to get the real link # cd # wget https://bsn.breach.com/downloads/t=5156aa8803d6f186cf38688be522a402/modsecurity-apache/modsecurity-apache_2.5.7.tar.gz # tar -zxfv modsecurity-apache_2.5.7.tar.gz # cd modsecurity-apache_2.5.7/apache2 # ./configure # make Copy the library …
3821 Days ago
No Thumbnail was found
A lot of people have tried numerous times to download files from my download section without success, the error message was always the same Unrecoverable error "PCLZIP_ERR_BAD_FORMAT (-10)" Also, Some tried to unpack the zip file locally using stuffit/Winrar/7Zip and get an error suggesting that the archive is damaged. Only Internet Explorer users were having issues, this is because of Internet explorer not able to handle compression of all file types. I solved the issue by changing my mod_deflate.conf which …
3955 Days ago
Benchmarking your LAMP server
The acronym LAMP refers to a solution stack of software, usually free and open source software, used to run dynamic Web sites or servers. It stand for: Linux, for the operating system; Apache, the Web server; MySQL, the database management system (or database server); Perl, Python, and PHP, the programming languages. &160;ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This …
4093 Days ago