World Wide Web

Table of Contents

1. DNS Alterations
2. Install and Configure Apache
3. Write Some Content
4. Virtual Hosts
5. Assessment
6. Last Words
7. [Optional] Authentication and Authorisation

Today we will configure the most common web server on the planet: Apache. This lab will in no way give you enough experience to manage an Internet-facing webserver with dynamic content, and we don’t have enough time to cover related issues such as web development. Indeed, there are multiple papers dedicated to precisely that. This is the first step down a very long road; an introduction to one aspect of a potent career path.

1. DNS Alterations

Web servers are commonly addressed using any of two common notations, either http://www.domain/ or http://domain/. We’ve configured this in the DNS lab already, but then our web server (which didn’t actually exist) was known to DNS as goliah.

Change the DNS so that both www.localdomain. and localdomain. resolve to our server’s addresses for both A and AAAA records[62]. You should not add an entry to the reverse zone, as we are defining aliases, and only canonical names go into the reverse zone. Remove the old entry for the non-existant Goliah. Use the following to test what you have done.

The localdomain. case is just a little bit tricky; remember that @ is shorthand for the $ORIGIN, which in this particular file (as defined in named.conf*), is localdomain., so either use a @ or leading whitespace, just as we did when specifying the nameservers (NS record) for our zone.

Move to Server
# rndc reload
Check your logs to ensure it worked, then begin testing
$ dig -t A +short www.localdomain
$ dig -t AAAA +short www.localdomain
$ dig +short -x
$ dig +short -x fd6b:4104:35ce::1
$ dig -t A +short localdomain
$ dig -t AAAA +short localdomain

[62] Alternatively, we could have made it so www has a CNAME of server1, but having duplicate A and AAAA records means we have greater flexibility, either to add other servers in round-robin DNS or to disable IPv6 by removing the AAAA record when accessing the web service.