Invalid command 'AuthDigestDomain'.

Hack3rcon

Registered
Jul 19, 2020
3
0
1
Italy
cPanel Access Level
Website Owner
Hello,
I want to set a password for the WordPress longing and I did:
Code:
# htpasswd -c /etc/apache2/.WP-htpasswd myuser
Then opened ".htaccess" file and added following lines to it:
Code:
<Files wp-login.php>
AuthType Digest
AuthName "Password Protected"
AuthDigestDomain /wp-login.php https://www.mywebsite.com/wp-login.php
AuthUserFile /etc/apache2/.WP-htpasswd
Require valid-user
Satisfy All
</Files>
But, website showed me "Internal Server Error" and Apache log showed:
Code:
[Sat Oct 22 14:37:16.155359 2022] [core:alert] [pid 84147:tid 47391070549760] [client X.X.X.X:45724] /home/mywebsite/public_html/.htaccess: Invalid command 'AuthDigestDomain', perhaps misspelled or defined by a module not included in the server configuration
[Sat Oct 22 14:37:16.155526 2022] [core:alert] [pid 84147:tid 47391070549760] [client X.X.X.X:45724] /home/mywebsite/public_html/.htaccess: Invalid command 'AuthDigestDomain', perhaps misspelled or defined by a module not included in the server configuration
[Sat Oct 22 14:37:17.723345 2022] [mpm_event:notice] [pid 84140:tid 47390787589184] AH00491: caught SIGTERM, shutting down
[Sat Oct 22 14:37:18.598342 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Sat Oct 22 14:37:18.598459 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.0"
[Sat Oct 22 14:37:18.598464 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: PCRE compiled version="8.32 "; loaded version="8.32 2012-11-30"
[Sat Oct 22 14:37:18.598468 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: LUA compiled version="Lua 5.1"
[Sat Oct 22 14:37:18.598473 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: YAJL compiled version="2.0.4"
[Sat Oct 22 14:37:18.598477 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: LIBXML compiled version="2.9.7"
[Sat Oct 22 14:37:18.598483 2022] [:notice] [pid 84599:tid 47508862534720] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Sat Oct 22 14:37:18.599109 2022] [suexec:notice] [pid 84599:tid 47508862534720] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Oct 22 14:37:19.170459 2022] [mpm_event:notice] [pid 84602:tid 47508862534720] AH00489: Apache/2.4.54 (cPanel) OpenSSL/1.1.1q mod_bwlimited/1.4 mod_cpanel/1.4 configured -- resuming normal operations
The Apache version is:
Code:
# httpd -v
Server version: Apache/2.4.54 (cPanel)
Server built:   Aug 24 2022 12:48:00
How to solve it?

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,188
2,415
363
cPanel Access Level
Root Administrator
Hey there! mod_auth_digest isn't installed by default on cPanel machines. You can install that Apache module through the WHM >> EasyApache 4 interface, and then I would expect that command to work properly.

Can you try that and let us know the results?