Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
gzip
scripts
.gitignore
Makefile
Makefile.psol_source
README.md
ats_base_fetch.cc
ats_base_fetch.h
ats_beacon_intercept.cc
ats_beacon_intercept.h
ats_config.cc
ats_config.h
ats_header_utils.cc
ats_header_utils.h
ats_log_message_handler.cc
ats_log_message_handler.h
ats_message_handler.cc
ats_message_handler.h
ats_pagespeed.cc
ats_pagespeed.h
ats_process_context.cc
ats_process_context.h
ats_resource_intercept.cc
ats_resource_intercept.h
ats_rewrite_driver_factory.cc
ats_rewrite_driver_factory.h
ats_rewrite_options.cc
ats_rewrite_options.h
ats_server_context.cc
ats_server_context.h
ats_thread_system.h

README.md

ScreenShot

Apache Traffic Server web content optimization plugin powered by Google PageSpeed

http://www.atspagespeed.com/

To build, a simple 'make' should work. Use 'sudo make install' to install. Optionally, patching ATS with ethread.patch helps with eliminating latency that sometimes gets induced when synchronising ATS's and PSOL's thread pools.

After that, update ATS's plugin.config with:

ats_pagespeed.so                                                                                 
gzip.so /usr/local/etc/trafficserver/gzip.config  

gzip.so also is build with ats_pagespeed, as it currently is a slightly modified version of the official one from the ATS repository.

There are some hard-coded things in the plugin, these directories should exist:

  • /tmp/ps_log/ to exist
  • /tmp/ats_ps/ to exist

Configuration files go into /usr/local/etc/trafficserver/psol. That folder is monitored, and changes to files in there are picked up immediately. A sample configuration:

# Base configuration for the module, all host-specific configuration
# will inherit. 
pagespeed RewriteLevel CoreFilters
# Mandatory FileCachePath setting. The path must exist and be read/write for the traffic_server process.
pagespeed FileCachePath /tmp/ats_pagespeed/
# [host]
[192.168.185.185]
# Force traffic server to cache all origin responses
override_expiry
pagespeed FlushHtml on
pagespeed RewriteLevel CoreFilters
pagespeed EnableFilters rewrite_domains,trim_urls
pagespeed MapRewriteDomain http://192.168.185.185 http://www.foo.com
pagespeed MapOriginDomain http://192.168.185.185 http://www.foo.com
pagespeed EnableFilters prioritize_critical_css,move_css_to_head,move_css_above_scripts
pagespeed EnableFilters fallback_rewrite_css_urls,insert_img_dimensions,lazyload_images,local_storage_cache
pagespeed EnableFilters prioritize_critical_css,rewrite_css
pagespeed EnableFilters combine_javascript,combine_css

You can view debug output of the plugin using traffic_server -T ".*speed.*"

The current state compiles against PSOL 1.9.32.3-stable