apache2.conf AuthType Basic

Egon Frerich <[email protected]> Wed, 11 Mar 2026 14:07:03 +0100
Newsgroups gmane.comp.apache.user
Message-ID <[email protected]>
--------------0V7q6BkW3Px2z0ax8OWORtOU
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I want to allow only user with password to see /gitweb. I put this into 
apache.conf:

|<Directory /opt/gitweb> Options Indexes FollowSymLinks AllowOverride 
None #Require all granted AuthType Basic AuthName "flora" 
AuthBasicProvider file AuthUserFile "/etc/apache2/passwd/passwords" 
Require user xxx </Directory> |

But could see gitweb without a password.

What should I do?

Egon


--------------0V7q6BkW3Px2z0ax8OWORtOU
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I want to allow only user with password to see /gitweb. I put
      this into apache.conf:</p>
    <pre><code>&lt;Directory /opt/gitweb&gt;
        Options Indexes FollowSymLinks
        AllowOverride None
        #Require all granted
   AuthType Basic
   AuthName "flora"
   AuthBasicProvider file
   AuthUserFile "/etc/apache2/passwd/passwords"
   Require user xxx
&lt;/Directory&gt;
</code></pre>
    <p>But could see gitweb without a password.</p>
    <p>What should I do?</p>
    <p>Egon</p>
    <p><br>
    </p>
  </body>
</html>

--------------0V7q6BkW3Px2z0ax8OWORtOU--