Revision 1 as of 2006-07-17 19:24:12

Clear message

Ubuntu is a powerful platform on which to run a server. This guide will help you experiment with web server technology. Using Ubuntu will help you find which one best suits your needs before you have to commit to a third-party web hosting contract. You may even chose to host your server yourself.

Requirements

Hardware

Any computer that can run Ubuntu and connect to the internet can host a web server. Absolute minimum requirements are a Pentium one or equivalent with 64 megs of ram. Note that the linux-server kernel can not run on anything less than a 686-typse CPU. Installing a server on a Pentium one or equivalent box should be done using the alternate cd, which installs the linux-386 kernel by default.

You can run the server software on your current desktop or on a box by itself. If you want to use a seperate box, you will only need a screen and keybord for the installation. Once you reboot from the installation, you can install the ssh package and use the secure shell to access your server remotely.

Software

You also need to install the server software. There are many different technologies available for the web: LAMP, Dot Net (mono), Ruby on rails, JAVA. Probably the most popular is the LAMP stack. There are many web applications that can run on the LAMP stack.

It is extremely easy to install the LAMP stack on any computer runing Ubuntu.

An ubuntu server install in of itself does not install a graphical user interface. You get the running services and a command-line. It is, however, surprisingly easy to manage your web server software from the command-line either locally or remotely.

It is probably contrary to security best practices to install superfluous software on a dedicated server. However, for the purpose of experimenting and running web applications which are not "mission-crittical" to your enterprise, you can run desktop software (graphical environment and file manager) on the same computer that is attached to the internet and serving web pages. The LAMP packages do not function any differently when installed on a desktop system.

Reaching your computer

If you are a home user, you probably do not have a static IP address. That means that your internet services provider does not allocate a single IP address to you. Every time you connect to the internet and probably at regular intervals while you are connnected, your IP address changes. Therefore, you cannot reach your computer via the internet without knowing it's current IP address. A solution to that problem is to use Dynamic DNS. If you do not want to serve pages to the internet, but only to your LAN, you will notneed Dynamic DNS.

If you place your server inside your home network which is behind a router, you will need to forward port 80 to your server. That way, requests from the internet to your router will be sent to the web server. See your router's configuration for details.

If you want to install on a seperate box but do not use a router, it is advisable to conect the server directly to your internet service (ADSL or cable modem) and use IP masquerading (internet connection sharing) to connect your desktop to the server - which will be acting as a router. You need to have two network cards for that. The first one will connect to the internet and the second one is what you will use to connect your desktop to your server/router.

Internet Services Provider restrictions

Check with your ISP on restrictions regarding serving web pages. Often, your ISP will even block port 80. You can verify with your ISP if running a web server from your home for testing and self-educational purposes is permitted.

Steps

A stepwise sequence which will allow you to troubleshoot as you go along woud be:

1- Set up dynamic DNS and port forwarding to your server. 2- Install LAMP on your server 3- Check your dynamic DNS url to see if you can reach your server from the internet. 4- Install your web application 5- Configure your web application 6- Secure your server by removing unneccesary permissions and reading appropriate documentation.