adding .htpassword to my root of my web folder

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
User avatar
ClanPikachu
A regular
A regular
Posts: 59
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Nov 07, 2004 12:54 pm
Location: Portland Oregon USA
Contact:

adding .htpassword to my root of my web folder

Post by ClanPikachu »

how do I add .htpassword to my root or "home" folder of my website? for example my www address is http://fallenangels.nuclearfallout.net what is the address to the home folder? or root folder?
Image

-[LAPD]-Pikachu
Los Angeles California USA Game Server Administrator
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

User avatar
ClanPikachu
A regular
A regular
Posts: 59
Joined: Sun Nov 07, 2004 12:54 pm
Location: Portland Oregon USA
Contact:

Post by ClanPikachu »

Edge100x wrote:We discuss this here: http://rentals.nuclearfallout.net/rent. ... hosting#15
ok so i went there and created the htaccess now i'm having difficulty understanding the htpasswd file

this is what you all said:

Next, open up Notepad again with a new document. For each person you want to have access to your password-protected directory, you must add the following line:

LOGIN_NAME:HASHED_PASSWORD
LOGIN_NAME represents the name they will use to login, such as "Bob". HASHED_PASSWORD is the password you want them to have, which has been run through a special filter to change it to a different form. To apply the filter, visit this page and type in the password to give them. It will output what the password hashes to; copy that string (everything after the colon on the first line, including any periods or other odd characters) into Notepad as HASHED_PASSWORD.

lets say i want to give a user name of peter a password of justin3000 i go to your password link to get the hash and it gives me QWd.5KSNB5nho so my line in htpasswd looks like this

peter:QWd.5KSNB5nho

is this line correct? cause after doing this and uploading it to the directory it asks me for a password and keeps telling me the password of justin3000 is incorrect and prompts me again to put in a valid password. what is the exact verbage with the above user name and password do i need in the .htpasswd file do I need?
Image

-[LAPD]-Pikachu
Los Angeles California USA Game Server Administrator
User avatar
Edge100x
Founder
Founder
Posts: 12948
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Post by Edge100x »

That line is correct.

Make sure this line in .htaccess matches the path and filename of your .htpasswd file:

AuthUserFile /usr/www/USERNAME/DIRECTORY_TO_PROTECT/.htpasswd

USERNAME is the same username you use to log in through the FTP to the webspace.
User avatar
ClanPikachu
A regular
A regular
Posts: 59
Joined: Sun Nov 07, 2004 12:54 pm
Location: Portland Oregon USA
Contact:

Post by ClanPikachu »

ok this is what I have in my .htaccess file:

# Access file
order allow,deny
allow from all
require valid-user
Authname "Forum Administration for Pikachu"
Authtype Basic
AuthUserFile /usr/www/clanpikachu/pikachu/.htpasswd


the folder pikachu is right off the root of the ftp i placed the .htpasswd and the .htaccess file directly into the pikachu folder now when i access this folder it asks for a user name and password but does not accept whata I type in. what am I doing wrong?
Image

-[LAPD]-Pikachu
Los Angeles California USA Game Server Administrator
User avatar
ClanPikachu
A regular
A regular
Posts: 59
Joined: Sun Nov 07, 2004 12:54 pm
Location: Portland Oregon USA
Contact:

Post by ClanPikachu »

never mind I got it . Thanks guys :)
Image

-[LAPD]-Pikachu
Los Angeles California USA Game Server Administrator
gafoob
A semi-regular
A semi-regular
Posts: 20
Joined: Thu Feb 12, 2015 9:48 pm

Re:

Post by gafoob »

ClanPikachu wrote:never mind I got it . Thanks guys :)

What was the solution? Seems nobody has posted one
Post Reply