Make sure you choose the computing power of the servers depending on the load on it. If there are sites, keep in mind that the more popular they are, the more often they are accessed. Install software to protect against DoS-attacks (from the English. denial pf service). Note that they will not help in the event of a DDoS attack (distributed denial of service), which is carried out simultaneously with dozens of machines infected with malware. But not all such cases to blame the viruses. Sometimes a similar effect occurs if the reference to an unpopular website post on another popular. Such unintentional likeness of a DDoS attack is called the Slashdot effect, in honor of the Slashdot website, links to which can often lead to such situations.
Illiterate configured server software can crash when a request fails. If in the URL after the script name is a question mark, followed by - passed to the script options, the script can "fly" when one of these parameters is, for example, too many. When compiling the script must be protected from unintended transmission parameters, and maintaining logs of IP addresses of all the authors of such requests.
There are cases of failures in the servers due to an overflow of the hard disk, so choose the volume you need with the stock. If he suddenly goes down, will not only fail, but data loss - full or partial. To avoid this, periodically do a backup.
A server crash may occur due to a hacker attack or a software failure. This may happen due to low quality of the supply voltage. Therefore, we should not neglect the use of devices such as filters and uninterruptible power supplies. The server may hang and because of the dust in his body, especially under the motherboard, as well as from swelling of the capacitors, which lose capacity and begin to miss on the processor and other nodes of high frequency ripple. You should also not neglect the grounding of the enclosure, because it affects not only the electrical machine but also the sustainability of its work. It will not hurt as a hardware watchdog to automatically restart when hung.
Even a fully serviceable and operational, the server may become unavailable due to a malfunction of the devices between it and the user's computer. So before you look for a fault in the server, be sure that the reason is not in the intermediate switches and routers.