Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 29th, 2002, 03:32 PM
tommyj tommyj is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 29 tommyj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question apache on windows and .htaccess

hello. I cannot get the .htaccess to work with apache on windows! i've tried and tried but it doesn't work, so if anyone could help me i would be very happy!

here's my httpd.conf file:

Code:
<Directory "C:/Apache Group/Apache/htdocs">
Options FollowSymLinks
AllowOverride All
</Directory>


here's my .htaccess file (dir: C:/Apache Group/Apache/htdocs/.htaccess):

Code:
AuthName "password required"
AuthType Basic
AuthUserFile C:/Apache Group/Apache/htdocs/.htpasswd

require valid-user


I used the htpasswd.exe in the C:/Apache Group/Apache/bin/ directory to create the .htpasswd file. As all of us can see, this is not standard DES encryption. I got a message when creating the file in DOS prompt: "Automatically using MD5 format on Windows." and then the "enter new password" and then the "re-enter new password".

here's my .htpasswd file (dir: C:/Apache Group/Apache/htdocs/.htpasswd):

Code:
tommyj:$apr1$P75.....$yGZOTD9Ay.MUgjA6/yr30.


ok, so when i now go http://localhost/ no password prompt appears! what is wrong? please help

-me

Reply With Quote
  #2  
Old January 29th, 2002, 04:05 PM
mezz mezz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 310 mezz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Hello Tommyj, remember me?

Yes, you are right about Windows is using MD5, not DES.

Anyway, in Windows sometime have the problem to put .htaccess in the htdocs directory, so try do it in the sub-directory. Also, you should try to add Limit first. Look at below.

AuthName "password required"
AuthType Basic
AuthUserFile C:/Apache Group/Apache/htdocs/.htpasswd

<Limit GET POST>
require valid-user
</Limit>

Hope, it helps!

Cheers,
Mezz

Reply With Quote
  #3  
Old January 30th, 2002, 01:00 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
>>AuthUserFile C:/Apache Group/Apache/htdocs/.htpasswd

You have to put path inside double quotes, such as

AuthUserFile "C:/Apache Group/Apache/htdocs/.htpasswd"

The space between "Apache Group" confuse.

Mezz,
If you do not specify the Limit clause all methods are "limited".
__________________
My article: mod_rewrite: No More Endless Loops!

Last edited by pippo : January 30th, 2002 at 01:04 AM.

Reply With Quote
  #4  
Old January 30th, 2002, 09:37 AM
tommyj tommyj is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 29 tommyj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking thanks!

thanks mezz and pippo!
it works now, in a sub-directory. it is not possible to make it work in the server root dir?

anyway, mezz! yes i remember you! long time man! 'sup? You on icq sometime?

ok, thanks alot!

-me

Reply With Quote
  #5  
Old January 30th, 2002, 01:18 PM
mezz mezz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 310 mezz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Re: thanks!

Great, your welcome!!

>> it is not possible to make it work in the server root dir?

Well, I don't really know if it will working in Linux/BSD too. I guess, we will have to read at apache.org's docs about htaccess to see if it can be done in the root directory.

>> anyway, mezz! yes i remember you! long time man! 'sup? You on icq sometime?

I am doing great and have been play with my FreeBSD box a lot. I am learning many things on FreeBSD.

Yes, I leave ICQ on all the time. It's 68435360..

Your welcome again,
Mezz

Reply With Quote
  #6  
Old January 31st, 2002, 12:54 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
The settings inside .htaccess works into the doc root directory too.
( I just tried them with my winnt )

You could clear the cache of your browser ( are you using IE ? ).

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > apache on windows and .htaccess


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway