Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-22-2003, 03:11 PM   PM User | #1
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Path to my htaccess file, plz !

Hello there,

I am quite new to this htaccess stuff. I am trying to protect my website with this system. I have put the htaccess file in my "member" folder. So obviously the path to my htpasswd file would be : /web/member/.htpasswd
At least that's what I write in my htaccess file and it is not working. The password window pops up all the time and finally says it has not found the credentials bla bla bla.... (in my passwd file it is written usernameassword). I also set the CHMOD to 755.
I assume it is a wrong path name. Can someone please help me what path I should write in my htaccess file ?
Here are some info about my FTP, when I log in it says about UNIX and I transfer in ASCII.
Thanks for your future answer, if anybody is willing to help it would be so nice...
Take care
Thomas
ThomasCB is offline   Reply With Quote
Old 08-22-2003, 04:07 PM   PM User | #2
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Why is this smiley in the middle of my text ????
Sorry for that....
ThomasCB is offline   Reply With Quote
Old 08-22-2003, 06:22 PM   PM User | #3
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
I believe you need the specify the absolute path the the file.

Also to remove smilies from a post if you hit edit on of the 4 checkboxes under "Options" should say "Disabled Smilies in This Post"
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 08-23-2003, 11:10 PM   PM User | #4
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
http://www.javascriptkit.com/howto/htaccess3.shtml

See in the example how it has the full path to the .htpasswd file?
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 08-24-2003, 10:36 AM   PM User | #5
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Thanks for your reply Oracleguy. Actually I must have read this tutorial you are mentioning to me about 30 times. As well as all the threads that contain the word htaccess in this forum, before I considered posting. But still... I must be some kind of slower to understand or whatever.
Back to my problem...
This is an example of a full path like in the tutorial :

AuthUserFile /usr/local/you/safedir/.htpasswd

I am already stuck here as my htpasswd is in my /web/member folder. And before my /web folder there is nothing. So why would I go into my usr folder which on the tree is on the same level as my web folder. So maybe I did not get something here, I miss the point or what. So I still need help to find the absolute path. If you, oracleguy, have a paypal account and are willing to help me out with this I would be more than glad to pay for it. Don't get me wrong about this, it is just that my website is closed since 3 weeks because I can't protect this member section. Thanks again for your time....
Take care
ThomasCB is offline   Reply With Quote
Old 08-24-2003, 08:50 PM   PM User | #6
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
So the web folder is in the top level of the directory tree?

If so then /web/member/.htpasswd should work.

If not try web/member/.htpasswd

Tell me if either thing works.

Also, is this your server or are you being hosted by someone else?
__________________
OracleGuy

Last edited by oracleguy; 08-24-2003 at 08:54 PM..
oracleguy is offline   Reply With Quote
Old 08-25-2003, 09:46 AM   PM User | #7
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Thanks for your reply...I just tried both solutions but none of them work, the pop-up windows just keeps asking for the password and after the 3rd time I got an error message (Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.)
I am hosted at someone else's server, I had a chat with them already 2 weeks ago and they told me there is no problem using htaccess file.

When I enter me@webftp.mysite.com
The tree is vertically arranged like this :

bin
cgi-bin
etc
logs
opt
tmp
usr
var
web
And in the "web folder there is the "member" folder which I want to protect....
I have read in another tutorial that the CHMOD should be set to 644, so I change it, but it still does not work....
It seems quite incredible....
ThomasCB is offline   Reply With Quote
Old 08-26-2003, 02:52 AM   PM User | #8
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Now, what program are you using to generate the encrypted password for the .htpasswd file? I had a problem a while ago where I was using some site that supposedly had the feature to do it but it generated them wrong so the server kept rejecting the passwords.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 08-26-2003, 01:46 PM   PM User | #9
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Actually I am not using a encryption program.... I know it is not good, but it is not a must do, is it ? So I am just adding the users myself. Is this the problem ?
ThomasCB is offline   Reply With Quote
Old 08-26-2003, 05:29 PM   PM User | #10
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
You have encrypt the passwords in the list. Otherwise it won't be able to decrypt them when you visit the page and it is trying to compare the password you gave to the one in the .htpasswd file. I think that is where your problem lies. You probably had the path correct.

The program to encrypt the passwords is free and distributed with Apache. If you don't have it, I'll email it to you when I get home.

What you do is you enter the password into the program and it encrypts it using the MD5 encryption Apache uses and then lets you put the encrypted string into your .htpasswd file.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Old 08-26-2003, 05:35 PM   PM User | #11
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Oh, ok... so this was probably the problem ?? I feel.... stupid.
Please email me this program, that would be so kind of you.
My email adress is fcow at skynet dot be.
Thanks again for your answer, it is really nice of you to take the time.
Take care
ThomasCB is offline   Reply With Quote
Old 08-26-2003, 10:47 PM   PM User | #12
ThomasCB
New to the CF scene

 
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ThomasCB is an unknown quantity at this point
Good news Oracleguy, it works. Actually I read the tutorial again to encrypt the passwords and it works now. Also the path to my htpasswd file was wrong, completely wrong. It is something like this :
/mnt/mss-1/vol3/web/t/th/www.mysite.fr/web/ and so on...
I want to thank you for your time and your help, because you helped me alot and it means very much to me as this website is extremely important to me...
Thanks again and take care...
Thomas

ThomasCB is offline   Reply With Quote
Old 08-27-2003, 06:59 PM   PM User | #13
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Yeah no problem.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:46 PM.


Advertisement
Log in to turn off these ads.