Tag/tag.png

Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...

Tag/tag.png

Needs Expansion
This article is incomplete, and needs to be expanded. More info...

Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

This guide is written for the absolute beginner. These instructions apply to Ubuntu 6.06 (Dapper Drake).

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

Requirements

Hardware

Any computer that can run Ubuntu and connect to the internet can host a web server. The absolute minimum requirements for installation are a Pentium one or equivalent with 64 megs of ram. Note that the Ubuntu server installation cd will install the linux-server kernel and it can not run on anything less than a 686-type (Pentium two or better) 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. The linux-386 kernel is not optimised for any processor, but will run on every 386-type CPU.

An older, used computer is ideal for a hobbyist who wants to experiment and learn about web server hosting. Powerful hardware is only required to maintain high traffic loads in a production setting.

You can run the server software on your current desktop or on a box by itself. If you want to use a separate box, you will only need a screen and keyboard 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. You then do not need a screen or mouse and keyboard for your server.

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 running 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 not need 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 separate box but do not use a router, it is advisable to connect 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 configure Apache to use a different port than 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:

  • Set up dynamic DNS and port forwarding to your server
  • Install LAMP on your server. Install accessory software like SSH and phpmyadmin
  • Check your dynamic DNS url to see if you can reach your server from the internet
  • Install your web application
  • Configure your web application
  • Secure your server by removing unneccesary permissions and reading appropriate documentation.


CategoryInternet

WebServerHosting (last edited 2017-09-08 18:29:31 by ckimes)