Created
November 4, 2010 07:54
-
-
Save janx/662217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule pagespeed_module /usr/lib/httpd/modules/mod_pagespeed.so | |
# Only attempt to load mod_deflate if it hasn't been loaded already. | |
<IfModule !mod_deflate.c> | |
LoadModule deflate_module /usr/lib/httpd/modules/mod_deflate.so | |
</IfModule> | |
<IfModule pagespeed_module> | |
SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER | |
ModPagespeed on | |
# ModPagespeedUrlPrefix is the prefix assigned to some types of | |
# rewritten resources. This directive will be removed in a future | |
# release. For now, you must specify a URL and path for a hostname | |
# that is served by this Apache | |
# instance. http://yourhostname/mod_pagespeed is a good default | |
# value (replace localhost, below, with the hostname of your | |
# Apache instance). | |
ModPagespeedUrlPrefix "http://your.domain.com/mod_pagespeed/" | |
# The ModPagespeedFileCachePath and | |
# ModPagespeedGeneratedFilePrefix directories must exist and be | |
# writable by the apache user (as specified by the User | |
# directive). | |
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/" | |
ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/" | |
# Override the mod_pagespeed 'rewrite level'. The default level | |
# "CoreFilters" uses a set of rewrite filters that are generally | |
# safe for most web pages. Most sites should not need to change | |
# this value and can instead fine-tune the configuration using the | |
# ModPagespeedDisableFilters and ModPagespeedEnableFilters | |
# directives, below. Valid values for ModPagespeedRewriteLevel are | |
# PassThrough and CoreFilters. | |
# | |
# ModPagespeedRewriteLevel CoreFilters | |
# Explicitly disables specific filters. This is useful in | |
# conjuction with ModPagespeedRewriteLevel. For instance, if one | |
# of the filters in the CoreFilters needs to be disabled for a | |
# site, that filter can be added to | |
# ModPagespeedDisableFilters. This directive contains a | |
# comma-separated list of filter names, and can be repeated. | |
# | |
ModPagespeedDisableFilters rewrite_javascript | |
# Explicitly enables specific filters. This is useful in | |
# conjuction with ModPagespeedRewriteLevel. For instance, filters | |
# not included in the CoreFilters may be enabled using this | |
# directive. This directive contains a comma-separated list of | |
# filter names, and can be repeated. | |
# | |
# ModPagespeedEnableFilters collapse_whitespace,elide_attributes | |
# ModPagespeedDomain | |
# authorizes rewriting of JS, CSS, and Image files found in this | |
# domain. By default only resources with the same origin as the | |
# HTML file are rewritten. For example: | |
# | |
# ModPagespeedDomain cdn.myhost.com | |
# | |
# This will allow resources found on http://cdn.myhost.com to be | |
# rewritten in addition to those in the same domain as the HTML. | |
# | |
# Wildcards (* and ?) are allowed in the domain specification. Be | |
# careful when using them as if you rewrite domains that do not | |
# send you traffic, then the site receiving the traffic will not | |
# know how to serve the rewritten content. | |
ModPagespeedDomain * | |
# Enables server-side instrumentation and statistics. If this rewriter is | |
# enabled, then each rewritten HTML page will have instrumentation javacript | |
# added that sends latency beacons to /mod_pagespeed_beacon. These | |
# statistics can be accessed at /mod_pagespeed_statistics. You must also | |
# enable the mod_pagespeed_statistics and mod_pagespeed_beacon handlers | |
# below. | |
# | |
# ModPagespeedEnableFilters add_instrumentation | |
ModPagespeedCssInlineMaxBytes 10240 | |
ModPagespeedImgInlineMaxBytes 10240 | |
ModPagespeedJsInlineMaxBytes 10240 | |
# This handles the client-side instrumentation callbacks which are injected | |
# by the add_instrumentation filter. | |
# You can use a different location by adding the ModPagespeedBeaconUrl | |
# directive; see the documentation on add_instrumentation. | |
# | |
# <Location /mod_pagespeed_beacon> | |
# SetHandler mod_pagespeed_beacon | |
# </Location> | |
# This page lets you view statistics about the mod_pagespeed module. | |
<Location /mod_pagespeed_statistics> | |
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 | |
</Location> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment