Forum Moderators: phranque
Well i am making a personal site for a business that only the employees can see, and i need to password protect it. The password protect feature that 1and1 offers doesnt let me change the username, and the username is so obscure i cant use it. Its like 038ad838fha-3 .
I have researched it on here and it looks like i have to use .htaccess and .htpasswd files in order to use a custom password and username. It looks really easy to install, but im having problems. Here is what i have in my htaccess file:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /password/.htpasswd
<Files index.html>
require valid-user
</Files>
in my directory, i have a folder named password where the.htpasswd file is located. After putting up the files in ascii format, nothing is happening to my page. I read somewhere i might need to restart the server, but i called 1and1 hosting (probably has the worst technical support in hosting) and they couldnt help me, and said they cant help with installing scripts, and also said with my package i cant restart the server.
I dont know what to do, and i need this done quickly. It needs to be pretty secure, because it has important documents on the site. Can anyone give me a hint at what im doing wrong?
[httpd.apache.org...]
Also, 1and1 developers package is very strange. Its basically like they gave me one big ftp, and i create folders in the ftp and point the domain at them. So, when i loginto the user of a certain domain, my root folder for that domain is nothing, just "/".
with that being said i am assuming that in the htaccess file i point:
AuthUserFile /password/.htpasswd
does that seem right? Thanks again!
If you don't know your DocumentRoot, there are a number of ways to find it, the quickest is to ask your provider ;-)