Rutgers-Newark OIT
 < Return
Preparing Your Account For Webpages

When you first create a web page, be it personal, or for an assignment, you need to prepare your home directory to store the web pages and their associated files. This is quite easy to do, and if you follow the steps below, you will be well on your way to being a web publisher.

Web pages need to be located in a special directory where the web server can find them. On UNIX systems, such as Andromeda, Pegasus, or the Campus Web Server, the web server software is known as "Apache". By default Apache looks for web files in a personal directory called "public_html". Any files placed in this directory will be accessible by web browsers. You will also need to set permissions on the files contained within that directory so browsers can display them.

The following steps require you to log into your account and be in your home directory. As soon as you initially log in, you will be in your home directory. If you are not sure if you are indeed there, type cd on a single command line and hit return/enter. You'll be place directly in your home directory at that point.

Creating a Web Directory

Type "mkdir public_html" (without the quotes) to create the special directory. Note the underscore ( _ ).

That's all you need to do to create the special directory. The "underscore character " _ " is required to allow you to separate the words. In UNIX, you can not leave blank spaces between words in file names or directory names.

After you create the directory, you need to set permissions to allow browsers to access and display files you store there. This is done with the "chmod" command . CHMOD stands for "Change Mode".

Setting Permissions

Type "chmod 644" (without the quotes). This sets permissions on your subdirectory to allow read-execute access to your files or subdirectories. Generally you do not have to set individual files to specific permissions if you have set the subdirectory to allow access. There may be times when you want to change permissions to other settings. If you wish to read further about the CHMOD command, review the on-line manual. At your command prompt, type man chmod | more . This command will display the online manual for the command "chmod" and present it to you one page at a time.

Good Housekeeping

As with any set of directories, or folders, you'll want to be able to find files easily. As a rule, you should created subdirectories beneath the "public_html" directory to hold these files. While not necessary, it makes it easier for you to maintain the web directory you have created. Remember to set permissions on these directories.

Suggestions:

* html (for your web pages)
* images (for your image files)
* video (for any quicktime or real-audio video files you may have)

 Questions/comments regarding this web site can be directed to: webmaster@newark.rutgers.edu  © 2008 Rutgers, The State University of New Jersey. All rights reserved
 Last Updated:   January 28, 2008