A SIMPLE UNIX SERVER

Noah Sematimba

Log in as root onto your workstation.

Run /stand/sysinstall

Select the option that specifies Configure

Select packages from the next menu

You'll be asked to choose an installation media in the next

screen. Select ftp on this menu.

You'll then be taken to a screen where you select which ftp

site to use. In our case, we have a local ftp server installed here

with the packages we need. SO select URL to specify some

other ftp site by its url

You are then asked to put in the url for the ftp server

Since sysinstall is used for brand new installations, on the next screen you'll

get a message about whether the network is already configured. Select Yes

to this message. If this was an initial installation before configuring network s

services, then selecting no would take you to the network configuration menu.

Selecting Packages

On the next screen, you will be able to select from various package

groups. In our case we go straight to www where the web related

packages are.

For this session we shall select apache-1.3.33

We will also select mm-1.3.0 which is one of the dependencies of

the apache package.

Apache Configuration

Now that we have apache installed, we need to take a look at how to

configure it.

The main configuration file is called httpd.conf and is usually found

in /usr/local/etc/apache when apache is installed from a package or

from ports

Let us now use vi to edit this file and have alook at the default values.

The values we would be interested in changing or viewing here are:

ServerName pcN.e0.ws.afnog.org

DocumentRoot

cgi-bin

Listen

Now we shall edit /etc/rc.conf and set

apache_enable=”YES”

SO that our apache will be able to start on boot and also to enable our apache

to run.

Now to start apache we run:

/usr/local/etc/rc.d/apache.sh start

The apache process usually is called httpd and you can check that it is

running by using ps:

ps -auxw |grep httpd

Now use lynx-ssl to view what is on your webserver using

lynx http://localhost

Apache Log files

The apache log files reside in the directory /var/log. The files we're interested in are:

/var/log/httpd-access.log

/var/log/httpd-error.log

In our case we want to run tail -f /var/log/httpd-access.log to see if there were any errors in starting our apache server.

You can check to see if you have any syntax errors in your configuration files by running httpd -T

2005-04-19T10:18:39