title: Apache 2.2 Allow from env=_variable_
body: <p>I have an Apache 2.2 set up with LDAP Authorization, which is working fantastically as expected, and have also made it so that I can bypass Authentication when accessing it locally.</p>
  
  <p><code>Allow from</code> <em>localIP</em> <em>hostnameA</em> <em>hostnameB</em>, etc...</p>
  
  <p>If I <code>curl</code> from the server, I don't get any Auth Required.  So all good and working as expected.</p>
  
  <p>What I need now is to make one particular URL to also bypass authorisation.   </p>
  
  <p>I have tried all the usual solution of using <code>SetEnvIf</code>;</p>
  
  <pre><code>SetEnvIf Request_URI "^/calendar/export" bypassauth=true`
  Allow from env=bypassauth IP_ADDRESS HOSTNAME_A HOSTNAME_B
  </code></pre>
  
  <p>But this is just not working!!</p>
  
  <ol>
  <li>Local access is still unrestricted, but remotely it is not (no change there)</li>
  <li>If I dump out my server environment variables on that URL's script, I can see my <code>bypassauth</code> variable is being passed. </li>
  </ol>
  
  <p>I just cannot for the life of me figure out why the <code>Allow from env=bypassauth</code> part is not working, while it still obeys the additional directive parameters.</p>
  
  <p><em>I also</em> tried another suggestion, using the Location directive;</p>
  
  <pre><code>&lt;Location /calendar/export&gt;
    Satisfy Any
    Allow from all
    AuthType None
  
    SetEnv WTF 123
  &lt;/Location&gt;
  </code></pre>
  
  <p>Again, I can see my new environmental variable (<code>WTF</code>) appear on this URL (when I dumped the server envs in the script), so I know that the <code>SetEnv</code> and <code>SetEnvIf</code> directives are working.</p>
  
  <p>Is there anything I'm missing (any Apache2.2 quirks?), as all the solutions I've seen so far just are not working.  It's as if my <code>Allow from</code> changes are having no effect after restarting Apache.  I'm starting to feel my sanity slip.</p>
  
  <p>Is there also a particular order when writing the directives for <code>Satisfy Any</code>, <code>Order allow, deny</code> and the <code>Auth*</code> directives, which might be effecting this?</p>