SOLVED Add line of code to Vhost?

TonyE

Registered
Dec 16, 2016
3
1
3
Gold Coast QLD AU
cPanel Access Level
Website Owner
Hi
I am getting this error line in the log file:

'401 No basic authentication headers were found'

And need to add this line below to the vhost file as per this thread: [Moderator Note: Link to external URL removed per forum rules]

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
before the line "ProxyPassMatch".

Only I do not know what file to add this to as the instructions are not for Cloudlinux.

I am running:
  • CLOUDLINUX 6.9 x86_64 hyper-v – zero
  • cPanel & WHM 64.0 (build 11)
Any info would be appreciated,
Tony
 
Last edited by a moderator:

TonyE

Registered
Dec 16, 2016
3
1
3
Gold Coast QLD AU
cPanel Access Level
Website Owner
Thank you cPanelMichael
Got it to work, suprise!

FYI
I created the folder structure /etc/apache2/conf.d/userdata/ssl/2_4
I created a file authmod.conf in this folder.
authmod.conf has the following lines.
  1. #No basic authentication headers were found.
  2. #Nextcloud needs basic authentication headers for sync client on devices to work.
  3. SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
I'm happy to see it's working well. Thank you for updating us with the outcome.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Same here. The folders /etc/apache2/conf.d/userdata/ssl/2_4/ doesn't not exists. I've tried to create the same path but nothing happen before rebuildhttpdconf
Could you run the "/scripts/ensure_vhost_includes --all-users" command and let us know if that helps?

Thank you.