finnstone
asked on
htpasswd file error
apache file.
what is wrong with this file? i upload it into my ftp , but my login is still not working!
must be a formatting error.
.htpasswd
what is wrong with this file? i upload it into my ftp , but my login is still not working!
must be a formatting error.
.htpasswd
Tip: Normally /var/log/apache2/error.log (or your Distro equivalent) will tell you the exact problem, so likely best if you review this, as you might see the fix instantly.
If not, attach a copy of your error.log file also.
If not, attach a copy of your error.log file also.
I tried setting up an .htpasswd file as a test, and got it working... this is what I did
1. Generated the .htpasswd file contents from https://www.web2generators.com/apache-tools/htpasswd-generator
using username admin and password eetest which gave me:
2. Created an .htaccess file with contents:
3. Created an index.php file with a brief message.
I set this up on http://test.webgeneration.nz and it seems to be working fine. Hope that helps.
1. Generated the .htpasswd file contents from https://www.web2generators.com/apache-tools/htpasswd-generator
using username admin and password eetest which gave me:
admin:$apr1$uwfk86ah$ogbaU81YTfAF7gBuq0yGL.
2. Created an .htaccess file with contents:
AuthUserFile /home/webgener/public_html/ee/.htpasswd
AuthType Basic
AuthName "EE Test"
Require valid-user
3. Created an index.php file with a brief message.
I set this up on http://test.webgeneration.nz and it seems to be working fine. Hope that helps.
ASKER
i just try accesing it from the web . it used to work . but i forgot pwd so tried restting it using this file. i
terry, confused. what is difference between #1 and #2. which goes into my file?
terry, confused. what is difference between #1 and #2. which goes into my file?
There are 2 files to create, with different file names; did you notice the different names?
ASKER
ah. however there is no such file on my server to begin with. jsut the hpwd file.
Is there another .htpasswd file further up the directory tree that's being used instead of the one you've uploaded? What happens if you remove the one you uploaded and try to access the site?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Best if you show command you used to add the user/pass to your file.
Also, your Apache config stanza (entire <VirtualHost> directive set) to see how you're referencing your password file.
Also, the absolute path of your password file.