Hello there! Today we are going to see what is apache and how it works.before that lets see what is web server.
File servers, database servers, mail servers, and web servers use different kinds of server software. Each of these applications can access files stored on a physical server and use them for various purposes.The job of a web server is to serve websites on the internet. To achieve that goal, it acts as a middleman between the server and client machines. It pulls content from the server on each user request and delivers it to the web.
The biggest challenge of a web server is to serve many different web users at the same time — each of whom is requesting different pages. Web servers process files written in different programming languages such as PHP , Python, Java, and others.
They turn them to static HTML files and serve these files in the browser for web users. When you hear the word web server, think of it as the tool responsible for the proper server-client communication.
what is apache?
Apache HTTP server is a software (or program) that runs in the background under an appropriate operating system, which supports multi-tasking, and provides services to other applications that connect to it, such as client web browsers. It was first developed to work with Linux/Unix operating systems, but was later adapted to work under other systems, including Windows and Mac. The Apache binary running under UNIX is called HTTPd (short for HTTP daemon), and under win32 is called Apache.exe.
Apache's original core is fairly basic and contains a limited number of features. Its power rather comes from added functionality introduced through many modules that are written by programmers and can be installed to extend the server's capabilities. To add a new module, all you need to do is install it and restart the Apache server. Functionality that you don't need or want can easily be removed which is actually considered a good practice as it keeps the server small and light, starts faster, consumes less system resources and memory, and makes the server less prone to security holes. The Apache server also supports third party modules, some of which have been added to Apache 2 as permanent features. The Apache server very easily integrates with other open source applications, such as PHP and MySQL, making it even more powerful than it already is.
How apache server works ?
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 module for security, caching, URL rewriting, password authentication, and other features.
Lets see how to install apache in ubuntu
First of all you have to start a instance in your aws. Then you need to login with your ip on your terminal.
for that find the pem key and give user read access like this chmod 400 xyz.pem.then give ssh id.
then it should be loged in to your ip.
To install apacheo install apache:
- $ sudo su -
- s $udo apt install apache2
- $ then it asking for (yes or no) type y for accept
- $ then its starting to install
How to find apache config
- $ cd /etc/apache2/site-available/
- $ ls -la
- in there you can see apache confiq.
Thanks for reading my blog.
Comments