Password protecting my site
Posted by: pooman88 (---.hsd1.ca.comcast.net)
Date: January 09, 2008 06:47AM

How would i go about doing that? I tried a .htaccess tutorial but it didn't work.



Edited 1 time(s). Last edit at 01/09/2008 09:06AM by pooman88.

Options: ReplyQuote
Re: Password protecting my site
Posted by: toivo (203.19.130.---)
Date: January 10, 2008 01:28AM

Hi,

Here is an example of a .htaccess file in a folder that works under Wamp 5 :

AuthType Basic
AuthName "Your Site Name or Something"
AuthUserFile c:/wamp/apache2/conf/passwd
Require valid-user

You need to add the usernames and passwords into the file passwd by using the htpasswd utility, as described in the Apache documentation at [httpd.apache.org]. In Wamp 5 the program is c:\wamp\Apache2\bin\htpasswd.exe.

You need to have mod_auth_basic is enabled: go to the WAMP icon in the System Tray, then Apache Modules and make sure auth_basic_module is selected.

However, it looks as if you do not have to use .htaccess for authentication. Go to [httpd.apache.org] and have a look at the paragraph Authentication Example.

Regards,

toivo
Sydney, Australia



Edited 2 time(s). Last edit at 01/10/2008 02:09AM by toivo.

Options: ReplyQuote
Re: Password protecting my site
Posted by: pooman88 (---.hsd1.ca.comcast.net)
Date: January 10, 2008 02:14AM

My htpasswd.exe wont work when i try to run it.

I manualy made a htacces file and pswd file and i now get a 403 error when going to site


I just wanna password my whole site because it will be just for friends. i can't find anything to do that accept htacces files.



Edited 2 time(s). Last edit at 01/10/2008 02:34AM by pooman88.

Options: ReplyQuote
Re: Password protecting my site
Posted by: rogper (---.04-330-7570701.cust.bredbandsbolaget.se)
Date: January 10, 2008 10:03AM

What error cause htpasswd.exe report?
First you create the password file by adding the first user. The htpasswd command is most likely not in your path so start by CD into the directory. Like so:

cd c:\Program\GNU\wamp\bin\apache\apache2.2.6\bin


To create a new password file with initial user rogper, execute:

htpasswd -c path\to\.htpasswd rogper
New password: *******
Re-type new password: *******

To add another user "jdoe", execute:

htpasswd path\to\.htpasswd jdoe
New password: *****
Re-type new password: *****

Options: ReplyQuote
Re: Password protecting my site
Posted by: yfastud (Moderator)
Date: January 10, 2008 04:44PM

If your contents fo .htaccess differs from example that toivo posted above, you should post your codes here so people can help you out

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Password protecting my site
Posted by: pooman88 (---.hsd1.ca.comcast.net)
Date: January 11, 2008 12:15AM

I got it, thanks a lot for the help guys. It was saving as a notepad and not a htaccess file.

Options: ReplyQuote


Sorry, only registered users may post in this forum.