.htaccess: Invalid command 'Allow', perhaps misspelled or defined by a module not included in the server configuration

Viewed 5677

The Apache version that I used in my local machine is 2.4, when I accessed the url of my application in the browser, I got this error.

/var/www/app/public/.htaccess: Invalid command 'Allow', perhaps misspelled or defined by a module not included in the server configuration

This is the content of my .htaccess file:

SetEnvIf Request_URI ^/SOME_ENPOINT/ noauth=1
SetEnvIf Request_URI ^/auth/ noauth=1

AuthUserFile /var/www/app/.htpasswd
AuthType Basic
AuthName "APP Login"

Require valid-user
Allow from env=noauth

I am thinking that I will remove this line of code below in .htaccess file.

Allow from env=noauth

I already enabled the mod_env module of my apache server.

Is there way to solve this issue but using the environment variable noauth? Thanks :)

1 Answers
Related