Apache is the most common web server available (after Microsoft’s IIS). It has been in operation since 1996. 60% of all websites use Apache, making it more widely used than all other Web servers combined. The reasons behind its popularity are:
- Free download and installation.
- It is open source: source code is clear to anyone and everyone, which basically enables user to alter, optimize it, and fix errors and security holes.
- Suitability: Apache can be used for small websites or bulky websites alike. It can supply both static and dynamic content.
- Functions and operations that are not required can easily be removed.
What is Apache?
The Apache HTTP server is software that works in the background under an appropriate operating system. The OS should be such that supports multi-tasking, and provides services to other applications connected to it, such as client web browsers. It was developed to work with Linux/Unix operating systems, and adapted to work under other systems, including Windows and Mac. Apache binary running under UNIX is called httpd (short for http daemon), and under win32 is called Apache.exe. Installing Apache on Linux require some programming skills whereas installing it on a Windows platform is too easy, as you can run it through a graphical user interface.
Apache’s original core is basic and contains limited number of features. Its command comes from added functionality introduced through many modules written by programmers and can be installed to extend the server’s capabilities. To add a new module, the use is required to install and restart the Apache server. Functions not wanted can easily be removed. It keeps the server compact and fast to load, consumes less system resources and memory, and makes it less prone to security holes. The Apache server integrates with other open source applications, such as PHP and MySQL.
Apache server offers usage of various protocols through different ports like: hypertext transfer protocol (HTTP), simple mail transfer protocol (SMTP), domain name service (DNS) and file transfer protocol (FTP).
Working of Apache
Apache’s main role is all about communication over networks. It uses TCP/IP protocol (Transmission Control Protocol/Internet Protocol which allows devices with IP addresses within the same network to communicate with one another). In its idle state, Apache listens to the IP addresses identified in its config file (HTTPd.conf). Whenever it receives a request, it analyzes the headers, applies the rules specified for it in the Config file, and performs accordingly.
One server can host many websites and each website is assigned a different name by using virtual hosts.
Since IP addresses are difficult to remember, visitors usually type domain names into the URL address box. The browser links to a DNS server, which translates the domain names to their IP addresses. The returned IP address is taken by the browser and connects to it.
A hosted website has four main directories: htdocs, conf, logs, cgi-bin. The directories names can differ from one server to another depending on the Apache theme installed and the operating system though the roles remain the same.
Apache has been the topmost web server on the internet for a long time. It played a prominent role in shaping and making the World Wide Web. The reasons behind its success are apparent and sensing the present conditions, it will probably stay in the lead.