title: LocationMatch not working, is there a way to debug Apache?
body: <p>I have a server using Joomla on an AWS EC2, 64bit Amazon Linux v2.1.3, PHP 5.6, and we would like to prevent access to the /administrator folder php files, with the exception of our office ip, and the ip of the server, since the folder contains libraries used by scripts not located in that folder.</p>
  
  <p>I put together the following using LocationMatch, but it is not working. Access to the server is not restricted.</p>
  
  <p>I am not very familiar with Apache, and especially with SetEnvIf. Is the below setting the env=allow no matter what? Is there a way to test that? Is there anything else that is wrong?</p>
  
  <pre><code>&lt;LocationMatch "/(administrator|tmpl)"&gt;
   SetEnvIf Request_URI "\.(css|js|html|htm|gif|jpg|png|jpeg)$" allow
   Deny from all
   ##except if either of these are satisfied
   Satisfy any
   ##1. a valid authenticated user
   Allow from ip1 ip2
   ## or 2. allow is set
   Allow from env=allow
  &lt;/LocationMatch&gt;
  </code></pre>