1 - UMass



Setting up your web space for your ResEc112 Portfolio - Spring ‘07

1. Open SecureCRT (in the programs menu) and Connect to the web server: oitunix.oit.umass.edu. Accept a certificate if asked. Log in with your OIT username and password.

2. Put aside your mouse! For the rest of the UNIX session, you will only use your keyboard. Note: OITUNIX is case sensitive. Please make sure you use all lower case letters.

3. To allow public access to your account, at the % prompt, type chmod 711 ~ (you must enter the spaces), then press Enter. If all goes well, you'll simply see a new % prompt. UNIX only gives feedback when you make a mistake.

4. The next step is to create your Web folder (also know as a “directory”) (public_html). Type mkdir public_html, then press Enter.

5. Once you have created your public_html folder, you have to set its permissions so that people can view the files you upload there. Type chmod 755 public_html, then press Enter.

6. The next step is to create a folder to contain your web portfolio website for ResEc112. This folder will be inside the public_html folder, and will serve as the “root folder” for your entire website. Type cd public_html, then press Enter (to open up the public_html folder; “cd” stands for change directory). Type mkdir 112portfolio then press Enter (to create the root folder), and type chmod 755 112portfolio, then press Enter (to set its permissions so other people can view the files you upload there).

7. Time to test what you’ve done. Load up Internet Explorer and enter the URL (website address) of your site in the form of: (replace username with your OIT username). You should see an index of the files in your 112portfolio folder, as in the image to the right.

8. The next step is to create a “protected” folder to contain your assignments and other files you don’t want the public to see unless they know a password. This folder will be inside your root folder (112portfolio). Type cd 112portfolio, then press Enter (to open up the 112portfolio folder). Type mkdir protected then press Enter (to create the protected folder), and type chmod 755 protected, and then press Enter (to set its permissions so other people can view the files you upload there).

9. The next step is to create a file in the protected folder with the name “.htaccess” that will instruct the server to restrict access to the contents of this folder. We will use a UNIX text editor called pico. First, open the protected folder, type cd protected and press Enter. To create and edit the file, type pico .htaccess and press Enter (don’t forget the period before htaccess). Note: in pico, the delete key works like the backspace key, and you should avoid using your mouse to move around (it won’t work); instead use the arrow keys on the keyboard. You will want to enter the following text into the browser, but it will be easier to copy and paste if from this file on the ResEc112 calendar page. (Note, to paste use the SecureCRT tool bar or edit menu, not the key-combinations, which work differently here.)

AuthUserFile /u/u3/OITUSERNAME/.htpasswd

AuthGroupFile /dev/null

AuthName Protected

AuthType Basic

require user OITUSERNAME

Replace the text “OITUSERNAME” with your OIT username in two places, remembering that UNIX is case sensitive, so use lowercase letters if your username is lowercase. When done, press Ctrl-x (hold down the Ctrl key and tap the x key) to save the file. Confirm that you want to save by typing Y and pressing Enter.

10. Change the permissions of this file by typing chmod 755 .htaccess and pressing Enter.

11. The last step is to create the password file (named .htpasswd) which will be stored in the top-level folder of your account. To move up to the root folder, you will type cd .. and press Enter a total of three times. (Note, if you press the up arrow on the keyboard, the last command you entered will be displayed.) This command opens the “parent” folder of the currently open folder, so the first cd .. command moves from protected to 112portfolio, the second moves from 112portfolio to public_html, and the third moves from public_html to your account’s top-level folder.

12. The password file will be called .htpasswd (note the period in front) and it is created using a program called htpasswd (note no period). Type htpasswd –c .htpasswd OITUSERNAME and press Enter (Replace the text “OITUSERNAME” with your OIT username, and don’t leave off the “.” in front of the 2nd .htpasswd). Follow prompts to enter password. (Note, when you enter your password, the cursor will not move; just keep typing and press Enter when done.) Finally, change the permissions of this file by typing: chmod 755 .htpasswd and pressing Enter (don’t forget the “.”).

13. Test the protected folder by browsing to the address: (replace username with your OIT username). You should be asked for a username and password, and then you should see an index of the files in your protected folder.

14. To log off from your OITUNIX Account, type lo and press Enter.

15. Congratulations. Once the above steps are completed correctly, you should not need to return to SecureCRT and UNIX for this website; Dreamweaver will handle the rest.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download