Password protecting via .htaccess

skypanther

Exalted Code Master!
I tried using Webshell to password protect a directory. It seems to have created all the appropriate files, but I just get a '500 Internal Server Error' when I try accessing the directory. This is what was generated:

.htaccess in the protected directory
Code:
AuthType    Basic 
AuthName    "Restricted Area "
AuthUserFile    /hsphere/local/home/user_name/.htpasswd 
AuthGroupFile    /hsphere/local/home/user_name/dev/null 
Require    valid-user

.htpasswd in the account's root directory
username:encrypted_password

That all seems fine. Am I doing something wrong? Does this not work in linux hosts here?

Thanks,
Tim
 
That may be something else at play I'd first check the website access log, then if no hints to why submit a ticket for linux admins to check it :)
 
The error log tells me that the problem is the path to the .htpasswd file. I've tried:

/hsphere/local/home/user_name/.htpasswd
/hsphere/home/user_name/.htpasswd
/hshome/user_name/.htpasswd
/home/user_name/.htpasswd
/.htpasswd

(phpinfo() says the first is correct, but it's not working any better than the rest of them)

What is the correct path to the account's home directory? This is on web14.
 
Okay, the help desk just told me to go through the Web Shell wizard again. This time it worked. There was an .htaccess in the directory the first time through and I deleted it before this second time. So, maybe it failed because of that file. Anyway, it's working now.

Thanks,
Tim
 
Okay, the help desk just told me to go through the Web Shell wizard again. This time it worked. There was an .htaccess in the directory the first time through and I deleted it before this second time. So, maybe it failed because of that file. Anyway, it's working now.

Thanks,
Tim
Yes, I have heard of this before (if one exists that wasn't made by webshell wizard)

If I had known the fix was that easy I'd have told you :D I should have run it by the linux team before replying it seems. But credit to where it is due, I did not know this.
 
Back
Top