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 18.104.22.168: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
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
systemctl restart apache2
The issue “Invalid command ‘AuthGroupFile’” is fixed now.