Home Web Server

It’s worth noting that I used Apache’s Tomcat server for this installation, which is primarily a container for Java Servlets and Java Server Pages (JSPs). Tomcat can be used as a stand-alone server (as I have done here), however if you are not going to be using Java on your website, you’ll probably want to use the Apache HTTPD server instead.

1. Install Debian

Perform a Net Install. Only select ‘Standard Install’ on tasksel.

2. Install Java (Only necessary if you intend to run Java Servlets/JSP)

First you need to edit /etc/apt/sources.list file. To open in vim (text editor):

Add the following lines:

Save and close, then from the command prompt run:

Check you have the latest version of java:

3. Install Tomcat

4. Configure Tomcat

Get Tomcat to start on boot-up by creating an init file:

Add the following to the init file:

Then run:

Change Permissions:

Open the tomcat-users.xml file:

Add the following:

Now restart Tomcat for changes to take affect:

You can start and stop Tomcat when you need to with:

In your web browser go to http://localhost:8080, you should see Tomcat’s default home page.

5. Set up a domain name and configure your router

I created a free subdomain with dyn.com.

Setting up your router will vary, however my router had an option to include details of my Dyndns account, so it would update itself when my dynamic IP address changed.

Tomcat runs on Port 8080 by default and whilst you can change this, it’s probably easier to modify your router settings to requests to Port 80 get forwarded to 8080. Portforward.com has instructions for how to set up port forwarding on a huge array of different routers.

6. Create your website

Start by putting your home page here:

Now, go somewhere that is not on your local network, open a browser and typehttp://yourdomainname.com. You should see your new website in all its splendour!

 

John