3

I have a problem with basic auth in apache 2.4. I have these lines:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/foo
    ServerName my.domain.com

<Directory /var/www/html/foo/>
        Options FollowSymLinks
        Require all granted
        DirectoryIndex index.php
        AuthType Basic
        AuthName "Authentication Required"
        AuthUserFile "/etc/httpd/.htpasswd"
        Require valid-user
</Directory>

</VirtualHost>

Authentication is bypassed and shows the site without a password request.

1 Answer 1

6

Your configuration is granting access from any address.

You need to remove the line require all granted.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.