Networking Lab 6 -

childrenpenΔίκτυα και Επικοινωνίες

26 Οκτ 2013 (πριν από 3 χρόνια και 7 μήνες)

62 εμφανίσεις

Networking 1

Lab 6 Web & FTP Servers

Nicholas Koch

Background Information

You have built TCP/IP networks in the previous lab and now it is time for you to see where
the rubber meets the road. This week you will learn about HTTP and FTP servers, which are
two of the many available services that can operate on a TCP/IP network.

Netcraft has been monitoring the growth of the World Wide Web since 1995. It has a very
interesting site with information about various web server software packages.


According to Netcraft, what is the most popular type of web server in operation? Has this
always been the case? Describe the growth and evolution of web servers over the past ten
years. Explain how the number of reg
istered names has grown and how the web server
software preferences have evolved.

Download & Install a Web Server

A simple way to install a full
featured webserver is to use WAMP for Windows PC’s, MAMP
for Macintosh or LAMP for Linux. These software bun
dles are great for web developers
who want to work on a fully functional website, without actually uploading it to a remote
host. It is even possible to run these websites from your home if your ISP allows it and you
can configure your router to support it
. However WAMP, MAMP and LAMP include extra
software not required for this lab and we will

be using them today. I only mention them
for future reference, if you are interested.

Macs come with built
in web servers. Go to System Preferences
>Sharing. E
nable web
sharing to turn on the webserver.

For PCs, it’s a little more complicated as webservers do no not usually come preinstalled.

First, ensure that Apache is not currently installed on your computer under Start
> Control
> Add or Remove So
ftware. If it is, remove it.

On PC’s visit
. Download the latest stable binary version (without
crypto is ok) of Apache web server MSI installer for Win32. This is a pre
compiled version
the software installer. It is possible to download and compile the original source code for
Apache, but the precompiled version will suit our needs.

Once the file has been downloaded, install Apache by double
clicking the msi file.

Accept the license

Read the server description page

Configure the server information page. The domain is
. You decide the
server name, the administrator’s email address. Leave the default port 80 setting.

Use a typical setup with default directory settin

Click Install

Our domain:

Our server name:

Our admin email:

Testing the webserver

After the server software has been installed, you can test the server by typing

in the address bar of your browser. Localhost is the name of your local
machine and is used to test TCP/IP functionality. This is also known as the loopback
address. What is the corresponding IP address of “localhost” loopba
ck address? Type the
loopback IP address in your browser to test the server as well. If your server is correctly
configured and running, you should see a webpage at either the localhost name or loopback
IP address. What does the default homepage on your se
rver look like? What happens if you
type in your machine’s regular IP address?

Our local host IP:

Explore the documentation for Apache.

What is the main configurat
ion file for the Apache server? Open this file using a text editor
to view it as a text file. Are there other configuration files? If so, what are they for?

We found out that the main configuration file for Apache server is httpd.

Yes, there are other back
up files for it just in case something were to happen.

DOCUMENTROOT is the directory where your web server documents are located. What is
the path to your document root directory? (Search the configuration file to find this


How many languages does Apache natively support? Change the language preference on
your browser to another language that Apache supports. Refresh the localhost page to verify
that Apache does indeed recognize multiple languages. Wh
at language did you choose?
Return your browser preferences to English.

supports 6 languages. We changed ours to French

to test it out.

What are some other hardware/software platforms besides Intel/Windows machines that
are supported by Apache?
Do you think you would recommend Apache as a good server for
a commercial application? Why or why not? What costs would be involved with operating

Some other hardware/software platforms that Apache supports would be Netware
Binary and Unix. I thin
k that this would be an awesome commercial software
because it is free and seems to be very reliable.

Create a homepage

Create a simple webpage using a word processor or text editor for your server’s homepage.
If you don’t know how to do this, just creat
e a simple text file with some words on it.
Replace the existing index file in the document root directory with your file saved with the
same name.

Refresh the localhost page in your browser to verify that your changes were received.

Normally, web devel
opers do not create pages on the machine that serves them. Typically, a
file transfer utility is used to upload created pages to a server. Which leads us to the next

Download & Install FTP daemon.

Mac users

Go to System Preferences
le Sharing. Look under options to enable

PC users

Open a browser and visit
. Download the
latest version of Filezilla Server. There is an FTP client h
ere as well, but we are interested in
the server software so click on
“Browse All Files.”

Do not download the client


Doubleclick on the .exe server installer file to start the installation process. Simply click
“next” on all of the installation
windows, accepting all defaults.

Your software is now installed, but in order to use it, some further configuration is required.

Once the software is installed, a pop
up window will prompt you to connect to the FTP
server for a management console window
. What is the default address it wants to connect
to? Is this the address of your FTP server? If someone on another host wants to connect to
your FTP server, what address should they use? In general, what are TCP ports? What port
does the FTP server run on
? What port does the Web server run on? We will discuss this
further in class but for now you can read more about ports here:

Add FTP User Accounts

Mac users:

Under System Preference
> Users, create a user account “ftpuser” with a simple
password that can be used to login with.

PC users:

Select the Edit
>Users menu. Click Add, to add a user, then type a user name for
the new user account you are adding. You can add a password by clicking the password
check box in the Account Settings option. Once the account has been added, Click on
d Folders on the left side of the window. Browse to the Document Root directory
from the Apache configuration and share that folder. This will enable your FTP user to
connect to the webserver files in the Document Root.

User : userone

Password: kkp

Now you are ready to test your setup. Using a machine other than your server, verify that
you can login to your FTP server with the user account that you created. There are multiple
ways to login to the FTP server. Perhaps the simplest method is to once a
gain use a browser,
using the following format to connect:

ftpuser@your machine’s ip here

You will be prompted for a password, if you enabled a password on the account. Once the
password is accepted, you should be able to drag and drop to transfer

files to the server.
Create a web page called aboutme.html and ftp it to your server. Once it is uploaded via
FTP, the file should be stored in the web server’s document root folder and accessible
through the web server. What http address should you enter

to view the aboutme.html file
on your web server?

Modern browsers have the ability to connect and authenticate to FTP servers. Before
browser support for FTP you could either use an FTP client utility or most operating
systems support using FTP from a co
mmand line prompt.

Use a command line FTP Client

On Pc’s

Open a command line window by clicking start
>run and typing “cmd”.

On Macs
Open a terminal window

At the prompt, type “ftp” and hit enter. You should see a prompt like this:


Type “open”
and enter.

at the To prompt type the ip address of your FTP server and enter.

at the User prompt, type the username and enter

enter the password

at the ftp> type “ls”

What does the ls command do? For help on other FTP commands type a “?” and enter.
command would you use to receive or download a file? Send or upload a file?

The ls command lists the files that are on server.

Receive/download: recv

Send/upload: send

To exit ftp> type “bye”

You have now installed two basic Internet
services, the web server and the ftp server. What
are some other servers and services that can operate on the Internet?

Show your work to the instructor before shutting down & departing!