How to create your home page on the onyx server
Setting up your account
To prepare your home directory for access by a Web
server in the lab, you will need to modify the security for your
home directory and create a couple of folders.
- Create a directory cs125 and move all your program directories to
this
directory. Make sure that the directory cs125 can only be accessed by
you.
(For students in other classes, create a directory called myclasses
and move all your class directories inside this directory).
mkdir cs125
mv prog* cs125
chmod g-rwx,o-rwx cs125
The command chmod changes the mode of the file.
such that no one in
the group (the students) or others have any access to the cs125
directory.
You can check the permissions using the ls command as shown below.
ls -ld cs125
The output of the ls command should be similar to
what is shown below.
drwx------
4 amit faculty
1024 Sep 22 11:46 cs125
For more details on how directory and file
permissions work, please
check the section on File protection in the local Linux guide.
- Modify the permissions for your home directory such that is is
open to
group and others for read and execute permission. The following
commands
can be used (the tilde ~ represents your home directory)
cd ~
chmod g+rx,o+rx ~
Now check the permissions of your home directory
with the ls commands
as follows.
ls -ld ~
The output should be similar to the following:
drwxr-xr-x 53
amit faculty
4096 Oct 1 10:37 /home/amit
- Make a directory called public_html in your
home directory. Make
sure that this directory is readable by others. You can use the
following
commands to accomplish this task.
cd ~
mkdir public_html
chmod g+rx,o+rx public_html
ls -ld public_html
The output for the ls command should be similar to
what is shown below.
drwxr-xr-x 11
amit faculty
4096 Sep 29 10:20 public_html/
The public_html directory is
the only directory that will be
visible to anyone browsing your home page.
- Create a file called index.html inside the
directory public_html.
You
can use the gvim text editor to create this file or
use
Netscape Composer (which is an html editor). See the quick-start
notes(PDF format) on HTML to get started.
- Point your browser to
http://onyx.boisestate.edu/~loginid
where
loginid
is your login name on onyx. Now you have a home page on the web!