You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2018/07/27 11:47:10 UTC

[GitHub] oschaaf closed pull request #1703: Handle Apache >2.4 mod_authz_host

oschaaf closed pull request #1703: Handle Apache >2.4 mod_authz_host
URL: https://github.com/apache/incubator-pagespeed-mod/pull/1703
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/install/common/pagespeed.conf.template b/install/common/pagespeed.conf.template
index 756f7002d..72aa53c18 100644
--- a/install/common/pagespeed.conf.template
+++ b/install/common/pagespeed.conf.template
@@ -320,16 +320,33 @@
     # file, to allow any client that can reach your server to access
     # and change server state, such as statistics, caches, and
     # messages.  This might be appropriate in an experimental setup.
+    # Attempt to load mod_version if it wasn't loaded or compiled in (eg on Debian)
+    <IfModule !mod_version.c>
+      LoadModule version_module /usr/lib/httpd/modules/mod_version.so
+    </IfModule>
     <Location /pagespeed_admin>
-        Order allow,deny
-        Allow from localhost
-        Allow from 127.0.0.1
+        <IfVersion < 2.4>
+            Order allow,deny
+            Allow from localhost
+            Allow from 127.0.0.1
+        </IfVersion>
+        <IfVersion >= 2.4>
+            Require local
+            # see https://httpd.apache.org/docs/current/en/mod/mod_authz_host.html - Require all granted,
+            # Require ip, Require host or Require forward-dns,
+            # if access must be granted to other than local.
+        </IfVersion>
         SetHandler pagespeed_admin
     </Location>
     <Location /pagespeed_global_admin>
-        Order allow,deny
-        Allow from localhost
-        Allow from 127.0.0.1
+        <IfVersion < 2.4>
+            Order allow,deny
+            Allow from localhost
+            Allow from 127.0.0.1
+        </IfVersion>
+        <IfVersion >= 2.4>
+            Require local            
+        </IfVersion>
         SetHandler pagespeed_global_admin
     </Location>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services