eHow launches Android app: Get the best of eHow on the go.

How to Create a Password-Protected Web Site

Video Preview

Summary: In order to create a password-protected Web site, click on the directory of the Web site, select the "Security" option and decide on a password. Keep unwanted visitors away from a Web site by adding a password and user authentication steps with the tips in this free video on Web site construction from a professional computer consultant.

Views:
734
Presenter
By Dan Afonso
eHow Presenter

Dan Afonso is a computer consultant out of Central Massachusetts that has been working professionally in IT since 1993. Afonso has experience supporting computer networks of all sizes....read more

Post a Comment

Post a Comment

Video Transcript

"Remember, if you don't protect your website directory, it really is open for the entire world to see. Hi, I'm Dan Afonso of Afonso Consulting and Infold IT, and this is how to create a password protected web area. Now the general instructions here are for using Apache. If you're using IAS, it's actually pretty straight forward. You just go into the website, right click on the directory you want. You can go into the security under that. Where Apache's a little bit more involved, because you're editing text files. It's not much more complicated, in fact there's a standard pattern for all this. Let's take a look over here. What we have is the standard pattern for it, which is, you tell it where the user file's located, what type of authentication is going to be used. What you want to pop up when you actually try and protect the file, and what that directory needs to get over, to get access to. What the user needs to present in order to gain access to that part of the directory. So let's try it. Over here, I have my index page of my test website. Now I'm going to go protected dot html, make sure it comes out right. It's the same page, I'm not changing anything on it. So what I want to do, is I want to protect it. And the first thing I need to do is to create the password file. By default, this password file's going to be called dot htpasswd. You can create this in a variety of ways. If you don't have shell access, like I'm using here, you can go online to a myriad of ht password generators. That'll create the file, if you give them a bunch of user name and passwords. That's perfectly acceptable. I want to create it from a command line by using the ht password command. And if we do a dash help, you can see the syntax for it. Now all I really want to do here is ht password. The password file's going to be dot htpasswd. The user name, I'm going to call it DAlfonso, and I'm going to set mine and it's going to ask me for my password. Oh. And the password is going to be, well let's set the password, what the hell? Okay. So now, you'll notice still nothing. So now we have to tell it what to do. And now we use the ht access file. I'm going to edit that file. Now this file is used by Apache to tell per directory configuration, and it's usually limited in what it can do. What it can almost always do, is provide protection. Now since we don't have to password protect the entire directory, we just want to do a file, I'm going to use this form. Where I tell it which file to use. I'm just going to copy it, insert it into here and I'm going to edit what I need. So first thing, the files I want to go with just protected dot html. I'm going to call it protected here, that's fine. And the path to ht password, now this has to be the full path, not a relative path. So we're going to go with r slash www slash html slash ht password. This should be fairly straight forward for you to get from your provider. Okay, we're all set here. I'm going to save it. Now that we've made the changes in the file, we should be able to go to the protected file and get a password prompt. And perfect, there we are. So this is how we create a password protected directory. Remember, your provider has to allow this. Most of them do on commercial sites, but this is the easiest way to create a password protected directory in case you need to share data with only a few people. I'm Dan Afonso, this has been "How To Create A Password-Protected File Or Directory On Apache"."

eHow Article: How to Create a Password-Protected Web Site

Related Ads

  • Have you done this? Click here to let us know.
Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics