Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Tutorial: How to add password protection for apache
Google
Post new topic Reply to topic
Author Message
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Fri May 28, 2004 7:09 am Reply with quoteBack to top

a error is not a browser alert , see the logs
View user's profileSend private message
ciarĂ¡n
 
 


Joined: 13 Mar 2005
Posts: 4

PostPosted: Sun Mar 13, 2005 11:22 pm Reply with quoteBack to top

another method is to create a .htaccess file with the following code
note dreamweaver allows you to create them

Code:
AuthName "Members Only Area"
AuthType Basic
AuthUserFile "C:/Program Files/Apache Group/web/members/.htpasswd"
<Limit GET>
require valid-user
</Limit>


note that " " are used only when white space is in the path.

open the command promt @ apache's bin directory
(use this reg hack to right click a folder and open the command prompt)

[HKEY_CLASSES_ROOT\Directory\shell\Command]
@="Command &Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\Command\command]
@="cmd.exe /k cd \\\"%1\\\""


copy n paste the bold text to notepad and save it as a .reg file
now open the file and you'll be given an option to open the command prompt @ a folder when you right click on it.

with the command prompt open @ the bin directory type:

Code:
htpasswd -c .htpasswd YOUR_USER_NAME_HERE


type the password twice

now move the .htpasswd file from the bin directory to the location of your .htaccess file in this case its C:/Program Files/Apache Group/web/members/

add the following directive to your httpd.conf file

Code:
<Directory "C:/Program Files/Apache Group/web/members/">
Options FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>


save the files and start the server and the members directory of your site will be password protected.
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Mon May 08, 2006 2:43 am Reply with quoteBack to top

thought I'd link to the htpassword helper script
http://apache2triad.net/forums/viewtopic.php?t=4073
View user's profileSend private messageYahoo MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT