Authorization via.htaccess using AuthFormProvider file

The site has done authorization using the Apache module auth_form_module via .htaccess In. htaccess is written

Session On
SessionCookieName session path=/
SessionMaxAge 86400
#SessionCryptoPassphrase secret
AuthFormProvider file
AuthName "authenticationform"
AuthType form
AuthUserFile www/path_to_domains/login/passwords
AuthFormFakeBasicAuth On
ErrorDocument 401 "/log/aulogin.html" 
Require valid-user
<Files "/log/aulogin.html">
Allow from all
</Files>
ErrorDocument 404 /errdoc.php

When developing, I used a local OpenServer server on which everything worked perfectly. The mechanism is as follows: from a subdirectory, a form opens in the \log\ subdirectory, followed by a file router.php the file starts \login\index.php which prescribes different cookies. When transferring to an external hosting, authorization does not pass. An error appears Unauthorized This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Additionally, a 401 Unauthorized error was encountered while trying to use an ErrorDocument to handle the request.

 0
Author: Aligete, 2020-05-29