Apache Web Server
Apache HTTP Server is a free and open-source web server that delivers web content through the internet.
Apache Web Application Architecture
Apache is just one component that is needed in a web application stack to deliver web content. Apache is the web server that processes requests and serves web assets and content via HTTP. MySQL is the database that stores all your information in an easily queried format. PHP is the programming language that works with Apache to help create dynamic web content. Firewalls help protect the web application from both external threats and internal vulnerabilities depending on where the firewalls are configured. Load Balancers help distribute traffic across the web servers which handle the HTTP(S) requests (this is where Apache comes in) and application servers (servers that handle the functionality and workload of the web app.) We also have Database Servers, which handle asset storage and backups.
Features of Apache Web Server
Apache Web Server Work
Apache functions as a way to communicate over networks from client to server using the TCP/IP protocol. Apache can be used for a wide variety of protocols, but the most common is HTTP/S. HTTP/S or Hyper Text Transfer Protocol (S stands for Secure) is one of the main protocols on the web, and the one protocol Apache is most known for.
HTTP/S is used to define how messages are formatted and transmitted across the web, with instructions for browsers and servers on how to respond to various requests and commands. Hypertext Transfer Protocol Secure is usually through port 443 with the unsecured protocol being through port 80.
The Apache server is configured via config files in which modules are used to control its behavior. By default, Apache listens to the IP addresses configured in its config files that are being requested. This is where one of Apaches many strengths come into play.
With the Listen directive, Apache can accept and route specific traffic to certain ports and domains based on specific address-port combination requests. By default, Listen runs on port 80 but Apache can be bound to different ports for different domains, allowing for many different websites and domains to be hosted and a single server. You can have domain1.com listening on port 80, domain2.com on port 8080 and domain3.com on port 443 using HTTPS all on Apache.
Once a message reaches its destination or recipient, it sends a notice, or ACK message, basically giving acknowledgment to the original sender that their data has successfully arrived. If there’s an error in receiving data, or some packets were lost in transit, the destination host or client sends a Not Acknowledged, or NAK message, to inform the sender that the data needs to be retransmitted.
Although we call Apache a web server, it is not a physical server, but rather a software that runs on an HTTP server. Its job is to establish a connection between a server and the browsers of website visitors (Firefox, Google Chrome, Safari, etc.) while delivering files back and forth between them (client-server structure). The Apache software is also compatible with any operating system, from Windows to Unix. When a visitor wants to load a page on your website, for instance, the homepage or your “About Us” page, their browser sends a request to your server, and Apache returns a response with all the requested files (text, images, etc.).
The server and the client communicate through the HTTP protocol, and the Apache web server is responsible for the smooth and secure communication between the two machines.
Apache is highly customizable, thanks to its open-source infrastructure. Due to this, web developers and users can adapt its source code according to the type of website they’re creating.
In addition, Apache provides plenty of modules that allow server administrators to turn additional functionalities on and off. The Apache web server has modules for security, caching, URL rewriting, password authentication, and other features.
To configure Apache, you’ll need to access .htaccess. This Apache configuration file is supported by all Hostinger plans.
Apache Pros:
Apache Cons:
Execution of website:
Requests Can Apache Handle Per Second
By default, the Apache Request limit is 160 requests per second.
Increase Apache Requests Per Second
Install MPM module
We need to install the MPM Apache module to be able to increase Apache requests per second. You can use mpm_worker or mpm_event module for this, instead of mpm_prefork module which consumes a lot of memory.
Parameters