RequireAll overwrite authorization configuration in Files sections in Apache Httpd

Solution Verified - Updated -

Issue

  • I have following configuration in Apache httpd and found that RequireAll configuration inside Location directive overwrite authorization configuration in Files sections in Apache. i.e. Access of http://192.168.1.1/.htaccess is successful. Even access to .htaccess file is denied as per Files section configuration.
<Files ".ht*">
    Require all denied
</Files>

<VirtualHost 192.168.1.1:80>
ServerName 192.168.1.1
 <Location />
  <RequireAll>
   Require all granted
   Require not ip 127.0.0.1
  </RequireAll>
 </Location>
</VirtualHost>

Environment

  • Red Hat Enterprise Linux 7
    • Apache httpd 2.4.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.