Jump to content


Photo

Password check http.conf?


  • Please log in to reply
5 replies to this topic

#1 renaxgade

renaxgade
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 October 2003 - 12:39 AM

Ok I was trying to set up a directory in which only I can access with my name and password. I have apache running on a windows xp machine, and the permissions for the directory im trying to make are only me (in windows). I created a new user and pass with htpasswd. Now in my httpd.conf file my directory thing looks like this:
<Directory /root/ />
Options FollowSymLinks
AllowOverride AuthConfig
AuthType Basic
AuthName \"Restricted Files\"
AuthUserFile C:Program FilesApache GroupApache2binpasswd.txt
Require user Joey
</Directory>

Now the folder I am trying to protect is under htdocs (the document root) root/. So the full path is C:Program FilesApache GroupApache2htdocsroot

The user i created with htpasswd is Joey. When I try to access the directory root I just get forbidden. Nothing else. No prompt. Am I doing anything wrong? :shock:

#2 renaxgade

renaxgade
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 October 2003 - 10:44 AM

Bump. Can anyone help me with this?

#3 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 17 October 2003 - 05:21 PM

try using / in your path instead of . i\'m always as to how the configuration paths work for windows... :shock: have you tried using the full path in the Directory directive? ...or not with the ending slash:

<Directory C:/Program Files/Apache Group/Apache2/htdocs/root>


Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#4 renaxgade

renaxgade
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 October 2003 - 10:56 PM

Ok i Got that part working, it now prompts me for a user name and password. But it gives me invalid password. I am 100% sure that is the name and password I created with htpasswd and i even tried creating another one. In the logs it says
[Fri Oct 17 15:53:05 2003] [error] [client 192.168.1.100] (OS 2)The system cannot find the file specified. : Could not open password file: C:/Program Files/Apache Group/Apache2/bin/password.exe
[Fri Oct 17 15:53:05 2003] [error] [client 192.168.1.100] user Renaxgade not found: /root/

Even though Im sure the password file is there. Should I make it .txt? The httpd.conf file looks like...

<Directory \"C:/Program Files/Apache Group/Apache2/htdocs/root\">
Options FollowSymLinks
AllowOverride AuthConfig
AuthType Basic
AuthName \"Restricted Files\"
AuthUserFile \"C:Program FilesApache GroupApache2binpassword.exe\"
Require user Renaxgade

There definetly is a file in bin callled password.exe that I created with htpassword.

#5 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 18 October 2003 - 03:12 AM

i\'m not sure how windows functions, but i\'m making the guess it functions as linux does (on this occasion at least...) on windows password.exe is the program that creates a password file. for example... tell password.exe to create a password file called \"passes.txt\" in /this/directory then set your apache config to look in /this/directory/passes.txt for the password info.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#6 pauper_i

pauper_i
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts
  • LocationPhoenix, AZ, USA

Posted 18 October 2003 - 05:36 AM

Not wishing to be the bearer of bad news but ...

It is recommended that you install Apache Web server in a directory path with short directory names and no spaces.

Your present path includes spaces. Since Apache is really *nix code that has been tweaked to run on windows, it has a whole different idea as to how spaces should appear in a directory listing.

Alternatives:
* Reinstall apache to a different folder without spaces - pain in the butt, but pays off in the long run.
* change your paths to reflect the 8.3 names - easy quick fix, but now you have to do this for every script from now until forever!

Using the 8.3 syntax. your path would look something like:
C:/Progra~1/Apache~1/Apache2/bin/password.exe

You might want to use the DIR command with the /X parameter to get the long and short directory names so you can verify the actual number used after the tilde.

Hope that resolves your problem!

D
Genius is one percent inspiration, and ninety-nine percent perspiration. [br]Thomas Alva Edison




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users