cancel
Showing results for 
Search instead for 
Did you mean: 

Apache

Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

I want to Password protect my website so only those I wish to allow to view it can.

Several companies offer passord protection but I have been told to use Apache if my Server supports it.

I have no idea what all this means as I am a complete noobie her

Can anyone shed a little light on this and perhaps send a link or two to help me in my endevours.

Thanks all.

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

8 REPLIES
Community Veteran
Posts: 6,983
Thanks: 8
Registered: 10-04-2007

Apache

Apache is running on the plusnet server already.
What you need to do to make your site only available to people who know the password is to use ".htaccess".

See the tutorial Here for details on how to use this.
Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

Thanks for that link - it was most helpful.

However, I require the root directory (htdocs) to be protected at this point and set about the code as in the tutorial.

On entering the website I am met with the familiar Password Entry box
& have entered the Username and Passwords exactly as typed in the .htpasswd file but it fails to allow me to enter the site.

The .htpasswd file only consists of the one username and password with no spaces at all.

Removing the line feed at the end of the password makes no difference.

I notice that the tutorial says I should encrypt the password first. I see that the password is shown as a string of *s. Is this correct or has sopme sort of encryption already taken place which I should deal with.

Can you offer any possible solutions to my problem.

Cheers

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

Doh!

I should have read further about making sure the password file has the encryped Password.

So, I have tried to use the Encryption tool at http://www.euronet.nl/~arnow/htpasswd but get the error 'The page cannot be displayed'.

Also, I get the same error when I attempt to access the tool at http://cgi.support.plus.com/htpasswd/

Any help would be appreciated.

Cheers

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

I have now found the Password encryptor but when I access the site the first time the password is not requested. Doing aredfresh forces a password resquest. Any clues as to why this should be?

Also, if I move away from the site and vbacak again the password is not requested - is this normal behaviour?

Cheers

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

Community Veteran
Posts: 14,469
Registered: 30-07-2007

Apache

The password tool can now be found at http://usertools.plus.net/htpasswd/ and I have not had any problems with it when I tried it just now.

No idea why it takes 2 attempts to get a password prompt. Have you tried clearing your browser cache?

For your 2nd Q, yes it is normal as the browser remembers the password until it is closed down.
Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

Thanks.

A further search in these Forums already lead me to the correct address for the password tool.

But your advice has been helpful.

Cheers

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

Moderator
Moderator
Posts: 16,506
Thanks: 1,773
Fixes: 121
Registered: 06-04-2007

Apache

Thanks for all the previous advice on the use of Passwords with Apache with my plus.net webspace.

I now wish to use a similar password protection on my other site hosted by a different company.


I am unsure how I would port the 'AuthUserFile /share/isp/plusnet/www/co/colhindene/htdocs/.htpasswd' line to the new host root directory.

My root directory is in the form of 'mydomain.co.uk' then 'public_html'.

I have renamed the AuthUserFile to AuthUserFile /share/isp/4uhosting/www/my/mydomain/public_html/.htpasswd and uploaded the old .htpasswd and the new .htaccess files.

I get the correct login box with the wording I entered in the .thaccess file. But I cannot log-in.

Is the password code created from the above-mentioned tool specific to plus.net's webspace or is there anything else I need look into to solve this problem? And, yes, Apache is supported on my new web hosting account.

Thanks for any help.

Forum Moderator and Customer
Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain
He who feared he would not succeed sat still

prichardson
Grafter
Posts: 1,503
Registered: 05-04-2007

Apache

Hi,

If this is with another hosting company, then their directory structure will likely be very different.

I suggest having a look at the support documentation, and if needed, contact the support for the hosting company involved, for help with directory locations.

Kind Regards,