<IfModule pagespeed_module>
    ModPagespeed <%= @mod_page_speed %>

    # We want VHosts to inherit global configuration.
    # If this is not included, they'll be independent (except for inherently
    # global options), at least for backwards compatibility.
    ModPagespeedInheritVHostConfig <%= @inherit_vhost_config %>

    <% unless @output_filters.empty? %>
    <% @output_filters.each do |filter| %>
    AddOutputFilterByType <%= filter %>
    <% end -%>
    <% end -%>
    # The ModPagespeedFileCachePath directory must exist and be writable
    # by the apache user (as specified by the User directive).
    ModPagespeedFileCachePath            "<%= @file_cache_path %>"

    <% unless @rewrite_level.empty? %>
    ModPagespeedRewriteLevel <% @rewrite_level %>
    <% end -%>

    <% unless @disable_filters.empty? %>
    ModPagespeedDisableFilters <% @disable_filters %>
    <% end -%>

    <% unless @enable_filters.empty? %>
    ModPagespeedEnableFilters <% @enable_filters %>
    <% end -%>

    <% unless @domain.empty? %>
    ModPagespeedDomain <% @domain %>
    <% end -%>

    ModPagespeedFileCacheInodeLimit <%= @file_cache_inode_limit %>
    ModPagespeedAvoidRenamingIntrospectiveJavascript <%= @avoid_renaming_introspective_javascript %>

    <% unless @library.empty?%>
    <% @library.each do |library| %>
    ModPagespeedLibrary library
    <% end -%>
    <% end -%>

    # 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
        Allow from 127.0.0.1
        SetHandler mod_pagespeed_statistics
    </Location>

    # This page lets you view a graphical console displaying statistics about
    # the mod_pagespeed module.
    <Location /mod_pagespeed_console>
        Order allow,deny
        # This can be configured similarly to mod_pagespeed_statistics above.
        Allow from localhost
        Allow from 127.0.0.1
        SetHandler mod_pagespeed_console
    </Location>

    # Page /mod_pagespeed_message lets you view the latest messages from
    # mod_pagespeed, regardless of log-level in your httpd.conf
    # ModPagespeedMessageBufferSize is the maximum number of bytes you would
    # like to dump to your /mod_pagespeed_message page at one time,
    # its default value is 100k bytes.
    # Set it to 0 if you want to disable this feature.
    ModPagespeedMessageBufferSize 100000

    <Location /mod_pagespeed_message>
        Allow from localhost
        Allow from 127.0.0.1
        SetHandler mod_pagespeed_message
    </Location>
    <Location /mod_pagespeed_referer_statistics>
        Allow from localhost
        Allow from 127.0.0.1
        SetHandler mod_pagespeed_referer_statistics
    </Location>
</IfModule>
