Tuesday, 30 September 2008
WebServer Howto -choosing a server
At the end of the day a web server is just a piece of software that listens (on port 80) for requests from the internet and returns data streams to the requesting device (typically a browser). However, like most things there is more to it. The web server has to be able to handle multiple requests simultaneously without getting confused, may have to check that a request is valid and may have to run a program written in Perl, PHP or Python to create the data to be sent to the user.
There are lots of web server applications in existence but the market is dominated by two major applications, Apache and IIS (Microsoft’s Internet Information Service). Apache became the dominant web server in early 1996, IIS achieved number 2 position in December 1997. Today Apache has about 50% market share and Microsoft about 35%. Web servers are usually hosted on Linux or Windows servers. Linux is popular because it is free, robust and open source which makes for a large support community.
For server scripting (producing dynamic content via programs resident on the web server) there are a number of options. For many years Perl was the dominant programming system but PHP is now more popular. Python is a recent addition and is increasingly popular.
For websites that use a database to store data there are a wider range of options. In the open source space there are 2 major database products MySQL and PostgreSQL with MySQL now dominant. Proprietary databases include Oracle, Microsoft’s SQL Server and IBM’s DB2. Some of these products are available in free versions with limited power or functionality.
Thus we need to put together a complete system and run it on an operating system which leads us to a discussion of leading web server architectures. A term commonly used for web servers today is LAMP, which stands for Linux-Apache-MySQL-PHP (or Perl or Python). Some people run Apache-MySQL-PHP on windows, which gives the acronym WAMP and for those that use IIS you end up with WIMP. Microsoft offer a complete solution based on active server pages and SQL Server which doesn’t have a silly acronym.
Most low cost web hosting companies offer LAMP servers as the software is free, reliable and well understood. Many offer a full Microsoft solution with IIS and SQL Server, WIMP and WAMP servers tend to be built by it departments who base everything on Microsoft Server but want to take advantage of the low cost of implementation and power of PHP and MySQL.
It is possible to build a LAMP server on a PC by getting one of the popular Linux distributions and installing the appropriate packages. Ubuntu offer a server OS called JeOS (Just enough Operating System) that can be used to build a simple LAMP server with no extraneous software. It is also possible to install Apache-MySQL-PHP on any PC running windows. The easiest way is to get XAMPP from Apache Friends; this allows you to instal and run a fully functional web server with almost every feature you could want. However it is intended for development and personal use and has almost all security turned off so don’t connect it to the web.
Warning once you put a web server on the internet it will be attacked on average every 15 minutes by a web-bot, Trojan or script-kiddie. They know most of the obvious flaws and security holes so if you don’t set it up right –someone will get you.
Wikipedia links: PHP Python Perl Apache Linux MySQL PostgreSQL
Note: Although Wikipedia accuracy is of concern, on technical topics the level of contribution is very high.
For real Tek-Heads
It is possible to download and run a LAMP server on a PC using virtualisation. Get VMware Player and VA LAMP and you can have an industrial strength LAMP server running on your PC in about 45minutes (subject to download speed!)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment