Some time after Sam set up the basic Intranet Server, Frodo asked him if he could set up the internal web server. The Hobbit Resources (HR) department was in the process of preparing an Employee Handbook that was supposed to answer most of the questions that employees had about company processes, practices, policies, etc. For maximum flexibility, Frodo wanted it to be in HTML, and if could be hosted on a suitable web server, easily accessible via any browser.
The most logical choice for hosting the internal web server was
the Intranet Server, provided Sam could find a low overhead (in
terms of processing power and storage needed) web server. And
Sam found in the Apache Web Server,
the perfect solution.
Sam just installed the Apache package that came with his
Linux distribution. This package installed the Apache Web
Server version 1.3.12 into the folder
/var/lib/apache” on the Intranet
Apache ran right “out of the box” the way it was
installed. Sam could conveniently run
to start the web server and
to stop it. The “document root” was set to
/var/lib/apache/htdocs”, where there
was a welcome page and Apache documentation, including the
Sam read up the Apache manuals and quickly understood
what to do to achieve what he wanted. The Apache server
read its configuration from the file
conf/httpd.conf” in the folder into
which it was installed. To Sam's delight, he found that
the default configuration file already had reasonable values
for most of the options and was very well documented by
lots of useful comments placed in the appropriate sections
of the file. This considerably eased his task.
The first thing to do was to set up the “document root”
- the folder which contained all the HTML files, images, etc.
for the internal web site. He located and modified the
DocumentRoot” directive and set it to
/dump/LocalSite” - the folder where
he intended to put all the files comprising the internal web
site. Sam created a simple welcome page named
index.html” and put it into this folder.
(By giving it this name, Sam ensured that Apache serves the user
this page when the user does not explicitly specify a file name
in the URL.)
Sam changed the “
email@example.com”, so that
the hobbits could know (as if they did not!) who to contact
in case of problems with the web server.
Next, Sam changed the “
to send “
the host name to the user browsers. Sam was confident that this
would work properly, as he had already set up the internal DNS
Though not strictly needed, Sam changed the
HostnameLookups” to “
so that Apache would log host names (instead of mere IP addresses)
in its error and access logs.
To properly isolate logs created by Apache, Sam created the
logs” within the folder where
Apache was installed (“
He then set the “
ErrorLog” directive to
/var/lib/apache/logs/error_log” and the
CustomLog” directive to
The last thing Sam needed to do was to add the command
to the system startup scripts, so that the Apache web server
was started whenever the Intranet Server came up.
After these basic and simple configuration changes, Apache was
ready to serve the internal web site. Sam took the help of
a few hobbits to create a better welcome page with more useful
content. He took the Employee Handbook from the Hobbit Resources (HR)
department and put it into a suitable folder, and created a link
from the welcome page to the Handbook. The hobbits could very
easily access the internal web site by typing in the URL
into their browsers.
Apache did not require much by way of maintenance. It performed very smoothly and efficiently. Every now and then, Sam examined the error logs to see if he could proactively weed out any problems with the web site.
The maintenance of the internal web site was taken over by
enthusiastic volunteers who helped organise the content and
kept it updated.
Apache performed very well and was quite efficient. The Employee
Handbook proved to be very popular and soon the internal web site
was expanded to serve commonly needed information, like technical
documentation on the areas that the hobbits worked with, employee
profiles, projects information, etc. Frodo was quite pleased with
the result and congratulated Sam on a job well done.
The following resources proved immensely helpful to Sam while he set up the internal web server:
- Apache Web Server: The superlative web server that Sam used for serving the internal web site. Its efficiency and ease of configuration considerably helped Sam in his job.
- Apache Server Documentation: Online Apache server documents that helped Sam figure out what to change and how.
- Apache Overview HOWTO: The Linux HOWTO document that Sam consulted for general information on Apache.