You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pagespeed.apache.org by ju...@apache.org on 2017/12/30 04:41:36 UTC

[25/50] [abbrv] incubator-pagespeed-cpanel git commit: Add support for cPanel Easyapache4

Add support for cPanel Easyapache4


Project: http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/commit/f694cc34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/tree/f694cc34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/diff/f694cc34

Branch: refs/heads/master
Commit: f694cc34fa14ddc8cd8de6415eb9a202503c8c56
Parents: 4691471
Author: Prajith <pr...@gmail.com>
Authored: Tue Dec 15 12:30:33 2015 +0000
Committer: Prajith <pr...@gmail.com>
Committed: Tue Dec 15 12:30:33 2015 +0000

----------------------------------------------------------------------
 EA4/SOURCES/456_pagespeed.conf                  | 152 +++++++++++++++++++
 EA4/SPECS/mod_pagespeed.spec                    |  61 ++++++++
 EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm | Bin 0 -> 5096 bytes
 3 files changed, 213 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/blob/f694cc34/EA4/SOURCES/456_pagespeed.conf
----------------------------------------------------------------------
diff --git a/EA4/SOURCES/456_pagespeed.conf b/EA4/SOURCES/456_pagespeed.conf
new file mode 100644
index 0000000..de134fc
--- /dev/null
+++ b/EA4/SOURCES/456_pagespeed.conf
@@ -0,0 +1,152 @@
+<IfModule !mod_version.c>
+  LoadModule version_module modules/mod_version.so
+</IfModule>
+
+<IfVersion < 2.4>
+  LoadModule pagespeed_module modules/mod_pagespeed.so
+</IfVersion>
+<IfVersion >= 2.4.2>
+  LoadModule pagespeed_module modules/mod_pagespeed_ap24.so
+</IfVersion>
+
+<IfModule pagespeed_module>
+  # Turn on mod_pagespeed. To completely disable mod_pagespeed, you
+  # can set this to "off".
+  ModPagespeed on
+
+  # Direct Apache to send all HTML output to the mod_pagespeed
+  # output handler.
+  AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
+
+  # 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/"
+
+  # 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, CoreFilters, TestingCoreFilters and AllFilters.
+  #
+  # ModPagespeedRewriteLevel PassThrough
+
+  # Explicitly disables specific filters. This is useful in
+  # conjunction 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_images
+
+  # Explicitly enables specific filters. This is useful in
+  # conjunction 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 rewrite_javascript,rewrite_css
+  # 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.
+
+  # Other defaults (cache sizes and thresholds):
+  #
+  # ModPagespeedFileCacheSizeKb          102400
+  # ModPagespeedFileCacheCleanIntervalMs 3600000
+  # ModPagespeedLRUCacheKbPerProcess     1024
+  # ModPagespeedLRUCacheByteLimit        16384
+  # ModPagespeedCssInlineMaxBytes        2048
+  # ModPagespeedImgInlineMaxBytes        2048
+  # ModPagespeedJsInlineMaxBytes         2048
+  # ModPagespeedCssOutlineMinBytes       3000
+  # ModPagespeedJsOutlineMinBytes        3000
+
+  # Bound the number of images that can be rewritten at any one time; this
+  # avoids overloading the CPU.  Set this to 0 to remove the bound.
+  #
+  # ModPagespeedImgMaxRewritesAtOnce        8
+
+  # When Apache is set up as a browser proxy, mod_pagespeed can record
+  # web-sites as they are requested, so that an image of the web is built up
+  # in the directory of the proxy administrator's choosing.  When ReadOnly is
+  # on, only files already present in the SlurpDirectory are served by the
+  # proxy.
+  #
+  # ModPagespeedSlurpDirectory ...
+  # ModPagespeedSlurpReadOnly on
+
+  # The maximum URL size is generally limited to about 2k characters
+  # due to IE: See http://support.microsoft.com/kb/208427/EN-US.
+  # Apache servers by default impose a further limitation of about
+  # 250 characters per URL segment (text between slashes).
+  # mod_pagespeed circumvents this limitation, but if you employ
+  # proxy servers in your path you may need to re-impose it by
+  # overriding the setting here.  The default setting is 1024
+  # characters.
+  #
+  # ModPagespeedMaxSegmentLength 250
+
+  # Uncomment this if you want to prevent mod_pagespeed from combining files
+  # (e.g. CSS files) across paths
+  #
+  # ModPagespeedCombineAcrossPaths off
+
+  # Whether or not to log timing information for rewriting filters.
+  # Off by default to keep logs uncluttered.
+  #
+  # ModPagespeedLogRewriteTiming on
+
+
+  # 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
+
+  # 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>
+
+  # Uncomment the following line if you want to disable statistics entirely.
+  #
+  # ModPagespeedStatistics off
+
+  # 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>

http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/blob/f694cc34/EA4/SPECS/mod_pagespeed.spec
----------------------------------------------------------------------
diff --git a/EA4/SPECS/mod_pagespeed.spec b/EA4/SPECS/mod_pagespeed.spec
new file mode 100644
index 0000000..09f0f56
--- /dev/null
+++ b/EA4/SPECS/mod_pagespeed.spec
@@ -0,0 +1,61 @@
+%global ns_name ea-apache24
+%global module_name mod_pagespeed
+
+Summary: Apache module created by Google to help Make the Web Faster by rewriting web pages to reduce latency and bandwidth.
+Name: ea-apache24-mod_pagespeed
+Version: 1.9
+Release: 32.11
+License: Unknown
+Group: System Environment/Daemons
+URL: http://modpagespeed.com/
+Source0: 456_pagespeed.conf
+BuildRequires: wget
+BuildRequires: cpio
+Requires(pre): ea-apache24 ea-apache24-mod_version
+
+# Suppres auto-provides for module DSO
+%{?filter_provides_in: %filter_provides_in %{_libdir}/httpd/modules/.*\.so$}
+%{?filter_setup}
+
+%description
+Apache module created by Google to help Make the Web Faster by rewriting web pages to reduce latency and bandwidth.
+
+%prep
+%if %{__isa_bits} == 64
+wget -q -N -O  mod-pagespeed-stable.rpm https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
+%endif
+%if %{__isa_bits} == 32
+wget -q -N -O  mod-pagespeed-stable.rpm https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm
+%endif
+
+%build
+rpm2cpio mod-pagespeed-stable.rpm  | cpio -idmv
+%if %{__isa_bits} == 64
+mv usr/lib64/httpd/modules/mod_pagespeed{,_ap24}.so .
+%endif
+%if %{__isa_bits} == 32
+mv usr/lib/httpd/modules/mod_pagespeed{,_ap24}.so .
+%endif
+%{__strip} -g mod_pagespeed.so
+%{__strip} -g mod_pagespeed_ap24.so
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_httpd_moddir}
+install -m755 mod_pagespeed.so %{buildroot}%{_httpd_moddir}/
+install -m755 mod_pagespeed_ap24.so %{buildroot}%{_httpd_moddir}/
+# Install the config file
+mkdir -p %{buildroot}%{_httpd_modconfdir}
+install -m 644 %{SOURCE0} %{buildroot}%{_httpd_modconfdir}/
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(0640,root,root,0755)
+%attr(755,root,root)%{_httpd_moddir}/*.so
+%config(noreplace) %{_httpd_modconfdir}/*.conf
+
+%changelog
+* Tue Dec 15 2015 Prajith <pr...@gmail.com> - 1.9-1
+* Implement a new spec for cPanel

http://git-wip-us.apache.org/repos/asf/incubator-pagespeed-cpanel/blob/f694cc34/EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm
----------------------------------------------------------------------
diff --git a/EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm b/EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm
new file mode 100644
index 0000000..40b24c0
Binary files /dev/null and b/EA4/ea-apache24-mod_pagespeed-1.9-32.11.src.rpm differ