|
This page describes how I set up my web server.
I chose Linux as the operating system and Apache as my http server. My initial motivation was to have a personal web page.
I had a lot of multimedia files - mp3 files, pictures and
short movie clips - and my ISP only offered 5 Mbytes of storage.
It took some effort, but I have been hosting
my own web page
for the last year or so.
Because I have a web server, it is not very hard to use it
to host my podcasts as well.
To create the web server I needed to do the following:
- Get a computer that is not needed for anything else.
If it is to be a server, it has to be available all the time.
Mine is a little under-powered:
< 1 GHz processor, 128 Mbytes memory, 8 Gbyte disk.
- Choose an operating system. I chose Linux.
I am familiar with Unix and it's free, so I am not
pirating or dependent on an employer's good graces.
- Get a broadband ISP provider. I have switched from
Road Runner to SBC DSL (I don't watch
tv,
so I had to pay a premium for cable Internet!).
- Get a router: Mine is Asante.
- Download Apache http server. This is also free. The
Apache documentation is pretty clear. For some insight on
http.conf directives check
here.
- Get a free domain name: www.hokeg.dyndns.org from dynamic dns.
I should probably get shorter domain names for some of my web pages.
- Configure the router to do port forwarding of packets
addressed to port 80 (http) to my http server. This is an amazing
capability: My router has the public IP address assigned by
my ISP. My server has a private IP address. Private IP addresses
cannot be routed over the Internet, so my router does Network
Address Translation. That means that all the datagrams coming
out of the computers in my home network share my
router's public IP address. When packets come from the
Internet, the router translates back to the private IP address
and directs the packet to the correct computer.
With the additional feature of port forwarding, you no longer need
servers to have public IP addresses. The router is configured to
forward all packets addressed to port 80 to the designated http
server, even though it has a private IP address. Port forwarding
together with NAT is truly awesome!
- Run a program on the http server to check if the router's
IP address has changed. I use eponym which is written
in perl because I knew it would run on any operating system.
I selected eponym from a list of links on the Dynamic DNS web page.
If the ISP changes the IP address, eponym tells Dynamic DNS.
People can still reach the web page using the domain name of
hokeg.dyndns.org. I use crontab to make eponym check every
10 minutes.
|