PageSpeed Admin Pages

The admin pages are a collection of features that provide visibility into the operation of the PageSpeed optimizations.

The pagespeed_admin and pagespeed_global_admin pages aggregate a set of pages showing server state so they can be accessed from a single handler. By organizing all these features under a single admin page, this can be done once, and can serve as a launching point for future administration features. Before version the admin pages were read-only, but starting in version, cache purging is supported.

The name of the currently active page is underlined in the top navigation bar.

Page Related Options Description
Statistics Statistics
Shows server statistics since startup, such as how many resources are being optimized by filters, as well as various latency and cache effectiveness metrics.
Configuration Configuring Filters
ModPagespeedIf (Apache only)
Shows detailed configuration information including all filters, options, and the current cache flush timestamp.
Histograms add_instrumentation
Shows detailed latency data for Page Load Time, rewriting, caches and HTTP fetching.
Caches MemcachedServers CreateSharedMemoryMetadataCache EnableCachePurge Shows detailed cache configuration information. When accessed from the Admin handler, it can be used to inspect the contents of the cache, and provides an interface to purge the cache.
Console Statistics
Displays a console of graphs of server optimization behavior over time.
Message History MessageBufferSize Server-wide history of recent logging output from PageSpeed, including messages that are omitted from the server log file based on its log level.

Before, the main admin page is not available, but there are page-specific handlers for statistics, messages, and the console. In and later, the *_pagespeed_* handlers, such as mod_pagespeed_statistics, will continue to be supported:

Configuring Admin Pages

In this table we use the term "server" for an Apache VirtualHost and an nginx Server Block. We use the term "global" to mean the entire Apache or nginx system, covering all the configured VirtualHost and Server Blocks.

Apache HandlerNginx OptionVersion Description
pagespeed_admin AdminPath all administrative functions for a host in one handler. If you establish this handler, you don't need any of the other server-scoped methods. Only give 'admin' page access to clients that you are comfortable allowing to modify the state of your PageSpeed configuration.
pagespeed_global_admin GlobalAdminPath all administrative functions for the entire global state in one handler. If you establish this handler, you don't need mod_pagespeed_global_statistics.
mod_pagespeed_statistics StatisticsPath ( AllLaunchpad for Statistics, Histograms, and a subset of the Caches page as described above.
mod_pagespeed_global_statistics GlobalStatisticsPath ( 1.1+Same as above, but aggregates statistics across all configured servers. You must enable UsePerVHostStatistics for separate global statistics to be retained, otherwise all statistics will be global.
mod_pagespeed_message MessagesPath ( 1.0+Displays recent log messages printed by PageSpeed, including messages that may be below the current server loglevel threshold such as "Info" messages. Requires that MessageBufferSize be set.
pagespeed_console ConsolePath ( 1.6+Displays a console of graphs of server optimization behavior over time.

Establishing Handlers in Apache

Each handler is optional; add them individually to enable admin features. Note that when you add handlers for pagespeed_admin and pagespeed_global_admin you are granting read/write access to server-state. The other handlers are read-only. A sample handler that filters on IP address is in the default configuration, whose general form is:

<Location /PATH>
   Order allow,deny
   Allow from localhost
   Allow from
   SetHandler HANDLER_NAME

You can choose any path for a handler, but you must specify the handler name exactly as it appears in the table above. By convention we use use the handler name for the path. You may also want to employ login-based access to the admin pages, using AllowOverride AuthConfig. Please see the Apache 2.2 or 2.4 Documentation for details.

Establishing Handlers in Nginx

In nginx, the handlers must be specified as location blocks.

location /ngx_pagespeed_statistics { allow; deny all; }
location /ngx_pagespeed_global_statistics { allow; deny all; }
location /ngx_pagespeed_message { allow; deny all; }
location /pagespeed_console { allow; deny all; }
location ~ ^/pagespeed_admin { allow; deny all; }
location ~ ^/pagespeed_global_admin { allow; deny all; }

Note that these handlers must precede the "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" location block.

In version and later, the above location blocks are needed for each path you elect to enable in PageSpeed options:

pagespeed StatisticsPath /ngx_pagespeed_statistics;
pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
pagespeed MessagesPath /ngx_pagespeed_message;
pagespeed ConsolePath /pagespeed_console;
pagespeed AdminPath /pagespeed_admin;
pagespeed GlobalAdminPath /pagespeed_global_admin;

You can choose any path, as long as it's consistent between the pagespeed Path and the location. By convention we use the names as specified in the example.

Prior to version, the above "Path" settings do not exist, and the failure to specify location blocks leaves the paths active with no access restrictions. The module will service requests to the paths whether the location blocks are specified or not. This applies to /ngx_pagespeed_statistics, /ngx_pagespeed_global_statistics, /ngx_pagespeed_message, and /pagespeed_console.

If you define access control for /pagespeed_admin or /pagespeed_console, you must do so earlier in the configuration file than the path to handle .pagespeed resources, to ensure that the handlers are disambiguated.

Limiting Handler Access

Note: New feature as of

Apache's SetHandler access controls are accessible to anyone who can modify .htaccess files, so in a typical shared hosting context the global admin site isn't sufficiently protected. As of, PageSpeed allows setting an additional restriction of what domains are allowed to load handlers. For example, to deny access entirely, you could put:

ModPagespeedStatisticsDomains Disallow *
ModPagespeedGlobalStatisticsDomains Disallow *
ModPagespeedMessagesDomains Disallow *
ModPagespeedConsoleDomains Disallow *
ModPagespeedAdminDomains Disallow *
ModPagespeedGlobalAdminDomains Disallow *
pagespeed StatisticsDomains Disallow *;
pagespeed GlobalStatisticsDomains Disallow *;
pagespeed MessagesDomains Disallow *;
pagespeed ConsoleDomains Disallow *;
pagespeed AdminDomains Disallow *;
pagespeed GlobalAdminDomains Disallow *;

To allow access only to an admin, define a new VHost like, use standard web-server access control (IP or password) to restrict access to only that admin, and then at the top level of your config put:

ModPagespeedStatisticsDomains Allow
ModPagespeedGlobalStatisticsDomains Allow
ModPagespeedMessagesDomains Allow
ModPagespeedConsoleDomains Allow
ModPagespeedAdminDomains Allow
ModPagespeedGlobalAdminDomains Allow
pagespeed StatisticsDomains Allow;
pagespeed GlobalStatisticsDomains Allow;
pagespeed MessagesDomains Allow;
pagespeed ConsoleDomains Allow;
pagespeed AdminDomains Allow;
pagespeed GlobalAdminDomains Allow;

Now when you visit you'll see global (server-level) admin information, but users are not able to access this under their own domain or turn the handler on with .htaccess.

For all six of these options the default value is Allow *. If you explicitly Allow access to any site, all others are automatically Disallowed. Wildcards are allowed, and additional directives are applied in sequence. For example, consider the following config:

ModPagespeedAdminDomains Allow *.example.*
ModPagespeedAdminDomains Disallow *
ModPagespeedAdminDomains Allow
pagespeed AdminDomains Allow *.example.*;
pagespeed AdminDomains Disallow *;
pagespeed AdminDomains Allow;

This would allow access to, and but not

Shared Memory Statistics

By default PageSpeed collects cross-process statistics. While they're mostly intended for debugging and evaluation using /mod_pagespeed_statistics, /ngx_pagespeed_statistics, and the PageSpeed Console, statistics are also necessary for limiting concurrent image rewrites and background fetches. It's not recommended to turn them off, as their performance impact is minimal, but if you need to you can do so with:

ModPagespeedStatistics off
pagespeed Statistics off;

Virtual hosts and statistics

You can choose whether PageSpeed aggregates its statistics over all virtual hosts (the default), or to keeps separate counts for each. You can chose the latter by specifying UsePerVHostStatistics on. In that case, /pagespeed_admin, /mod_pagespeed_statistics and /ngx_pagespeed_statistics will show the data for whatever virtual host is being accessed. If you do turn per-virtual host statistics on, you can still access the aggregates under /pagespeed_global_admin, /mod_pagespeed_global_statistics or /ngx_pagespeed_global_statistics.

ModPagespeedUsePerVhostStatistics on
pagespeed UsePerVhostStatistics on;

Message Buffer Size

Determines the number of bytes of shared memory to allocate as a circular buffer for holding recent PageSpeed log messages. By default, the size of this buffer is zero, and no messages will be retained.

ModPagespeedMessageBufferSize 100000
pagespeed MessageBufferSize 100000;