How to configure web service in your unix account
By Lin Wang (2002)
This tutorial aims at helping students to configure web service in their unix accounts. However, the detail may vary in different environment with respect to different setting in the system. To complete this tutorial you need to have an account at the computer science lab of UQAM.
Step 1: Run telnet or ssh to connect to the labunix server at UQAM, then type in your user name and password to log into the system.
Server url: arabica.labunix.uqam.ca
In Windows, you could run: telnet arabica.labunix.uqam.ca
In Unix/Linux, you could run: telnet arabica.labunix.uqam.ca or ssh
arabica.labunix.uqam.ca
or you could use any other telnet or ssh tools to connect.
Step 2: In your home directory, create
a directory public_html, which will be the home directory of you web
site.
cd ~
mkdir public_html
Then, set the permission value of this directory:
chmod 755 public_html
Step 3: Create a file .htaccess in the directory public_html.
cd public_html
pico .htaccess
Then, type in the same text as following while running pico:
Options Indexes ExecCGI
Save the file and exit pico. You also need to set the permission value of this file:
chmod 744 .htaccess
Step 4: Change the permission value of your home directory:
chmod 755 $HOME
or
chmod 755 ~
Now, you have completed all the configuration steps.
Your web url is: http://www.labunix.uqam.ca/~yourusername,
you need to replace yourusername with your
user name.
The default page is ~/public_html/index.html
Let's create this file.
Step 5: Use pico to create a file named index.html in public_html directory.
cd ~/public_html
pico index.html
Type in the following text:
<html>
<head>
<title>My first web site</title>
</head>
<body bgcolor="#FFFFCC" text="#000000">
<p><font size="4"><b><font color="#0000FF">Hello,
this is my first Web!</font></b></font></p>
</body>
</html>
Then, save it and exit the pico.
Don't foget to set the permission value of this file:
chmod 744 index.html
Now you can see this web page from a browser.
Open any browser, IE or Netscape whatever, in your system, type http://www.labunix.uqam.ca/~yourusername
on the address field ( replace yourusername
with your user name) and press enter key. The page you just created is presenting
in the browser.
------------------------------------------------
Hello, this is my first Web!
-------------------------------------------------
It's great! Isn't it?
What's more?
Finish!!! You don't need to pay the bill. It's free!