SOLVED Apache authentication directive not working as expected

Benjamin D.

Well-Known Member
Jan 28, 2016
128
17
68
Canada
cPanel Access Level
Root Administrator
After migrating server-A to server-B using the Transfer Tool (both servers are on WHM 72.0 supposedly the exact same configuration, at least I checked everywhere I could think of in WHM, like Tweak Settings, EA4 profile and modules, went over them side by side one by one), I noticed every website that used the Apache authentication directive like "WWW-Authenticate: Basic" does not work anymore. The password input pops up in the browser as usual, but even if the correct username/password is put in, it cycles in a loop, refusing the credentials.

Anybody knows why it used to work on server-A but after a migration on server-B this would not work anymore?

Same symptom, different issue than: .htaccess AuthType not working, keeps prompting for password since I do not use Squid and it does the same thing over HTTPS.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
HI @Benjamin D.

This is a really tricky issue to troubleshoot without access to the server. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

Benjamin D.

Well-Known Member
Jan 28, 2016
128
17
68
Canada
cPanel Access Level
Root Administrator
@cPanelLauren Yes, but in exchange, could you please check my other unresolved forum posts and try to help me resolve them?

1) High load coming from /usr/sbin/mysqld --daemonize?
2) Remote MX DNS entries auto-merged to local MX?
3) New Thread - Failed to access DBM file Permission denied
4) New Thread - WHM > Manage SSL Hosts > Error 500: An invalid destination was provided.

The solution was found on this random SO thread: https://stackoverflow.com/a/7053320/8027363

>> "If Server API is CGI/FCGI, you can pretty much forget it as there is no sensible way to use HTTP auth from PHP."

The Transfer Tool did not migrate my PHP Handler configuration, therefore it was left by default on CGI, which I never used and also since the newer WHM versions have the PHP Handler buried deeper within its interface, it took a while to find it, but when I did and switched it back to suphp like it was on my other server, the problem was instantly resolved. Well, not "instantly" resolved, since I also had to recursively change all the permissions to 755 on /home/*/public_html/ but almost instantly ;-)
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
Hi @Benjamin D.

I promise we'll get to the other threads as soon as we can. In fact, I'm currently looking at #2, the others I'll address as soon as I can. Thank you for providing the solution, unfortunately, the transfer tool won't change the handler to that of the source server but I am glad you were able to find the resolution and I know it will help others in the same situation.

Thanks!