4

I am trying to use RequireAny to allow acces to a site from either a certain IP or with a certain username. However, when I try to run apache I get the following error:

Invalid command '<RequireAny', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. 

The part of my apache file with authentication looks like this:

<Directory /var/www/web/> Options Indexes FollowSymLinks AllowOverride AuthConfig FileInfo Options AcceptPathInfo On AuthName "Protected Site" AuthType Basic AuthBasicProvider file AuthUserFile /etc/apache2/.htpasswd <RequireAny> Require user dev Require ip 71.198.111.188 </RequireAny> #Order allow,deny #allow from all </Directory> 

Why am I getting an error when using RequireAny in this case?

2
  • 1
    Which version of Apache are you using? Commented May 28, 2013 at 23:42
  • Server version: Apache/2.2.22 (Ubuntu) Commented May 28, 2013 at 23:45

1 Answer 1

5

The <RequireAny> and Require directives that you're trying to use were added in Apache 2.4 and are in the mod_authz_core module. They are not available in Apache 2.2.

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.