How to fix “Invalid command ‘AuthGroupFile'” not included in the server configuration

Apache HTTP Server

I’ve noticed the following error while creating .htaccess file for my test domain.

[Mon Apr 27 12:23:31.372528 2020] [core:alert] [pid 3783] [client 104.18.52.192:46990] 
/srv/www/htdocs/production/www.testwebsite.com/.htaccess: Invalid command 'AuthGroupFile', 
perhaps misspelled or defined by a module not included in the server configuration, 
referer: http://www.testwebsite.com/

If you are getting the same issue, then follow my instructions to fix the issue.

In your .htaccess file, you have mentioned the command like ‘AuthGroupFile’ and it requires the apache module ‘authz_groupfile’. All you need to do is, just install this module to fix this issue.

Command for activating “authz_groupfile” apache module

sudo a2enmod authz_groupfile

Sample Output:

root@gtechhub:/home/user# sudo a2enmod authz_groupfile
Considering dependency authz_core for authz_groupfile:
Module authz_core already enabled
Enabling module authz_groupfile.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart apache2 to apply the changes

Apache2 Restart

systemctl restart apache2

The issue “Invalid command ‘AuthGroupFile’” is fixed now.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *