renaxgade Posted October 17, 2003 Share Posted October 17, 2003 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: Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/ Share on other sites More sharing options...
renaxgade Posted October 17, 2003 Author Share Posted October 17, 2003 Bump. Can anyone help me with this? Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/#findComment-3946 Share on other sites More sharing options...
effigy Posted October 17, 2003 Share Posted October 17, 2003 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> Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/#findComment-3953 Share on other sites More sharing options...
renaxgade Posted October 17, 2003 Author Share Posted October 17, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/#findComment-3955 Share on other sites More sharing options...
effigy Posted October 18, 2003 Share Posted October 18, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/#findComment-3957 Share on other sites More sharing options...
pauper_i Posted October 18, 2003 Share Posted October 18, 2003 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 Quote Link to comment https://forums.phpfreaks.com/topic/1174-password-check-httpconf/#findComment-3959 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.