Izhffrlw 5 WM 3 Mrbupb 7 Z
Izhffrlw 5 WM 3 Mrbupb 7 Z
Izhffrlw 5 WM 3 Mrbupb 7 Z
SIR UMER
SUBITTED BY
MUNIR HUSSAIN
TASK 26:
Apache Server on Linux
HELP:
As a Web server, Apache is
responsible for accepting directory (HTTP)
requests from Internet users and sending them
their desired information in the form of files
and Web pages. Apache is the most commonly
used Web server on Linux systems. Web
servers are used to serve Web pages requested
by client computers. Clients typically request
and view Web pages using Web browser
applications such as Firefox, Opera,
Chromium, or Internet Explorer.
How to install Apache web server on Linux
Apache is the most popular web server developed by Apache Software Foundation.
It offers several features that make it very useful for websites. Apache HTTP
server is supported on all operating systems including Linux, Windows, MacOS,
FreeBSD, etc. It is also a part of the web service stack-LAMP stack.
In this post, we will explain how to install Apache on Linux server. The commands
discussed in this article have been tested on Ubuntu 20.04 LTS (Focal Fossa).
The same commands are also valid for Debian distribution.
Prerequisites
• Ubuntu or Debian machine
• User with sudo privileges
AD
Apache Installation
Apache is available in the official repositories of Linux Ubuntu. Therefore, we can
easily install it using the apt-get install command. Following are the steps to install
Apache on Linux.
First, update the system repositories using the following command in Terminal:
$ sudo apt-get update
AD
AD
When prompted for confirmation, hit y, after which the installation of Apache will
be started on your system. Depending on your network connection, the installation
of Apache may take some time.
The following output confirms the Apache has been installed with version 2.4.41.
You can also view the status of Apache service to verify if it is properly running.
Issue the following command in Terminal to do so:
$ systemctl status apache2
AD
The active (running) status in the following output shows that the Apache service
is active and running.
In case, the service is not started automatically, you can start it using the below
command:
AD
The following page shows that Apache has been successfully installed on your
system.
If you want to access the Apache from another system on the network, you will
need to configure a rule in the firewall which has been discussed in our post about
Apache configuration.
Remove Apache
In case, you no longer need Apache server on your system, you can easily remove
it using the below command:
AD
$ sudo apt-get remove apache2
When prompted for confirmation, hit y, after which the system will remove
Apache.
That is all there is to it! In this tutorial, you have learned how to install Apache on
Linux server. It takes just a few simple steps to install Apache web server in Linux
machine. In our next article, we will look at configuration for the Apache server
and host a small application.
https://linuxways.net/ubuntu/how-to-install-apache-web-server-on-linux/
1. Start Apache:
```
sudo systemctl start apache2
```
or
```
sudo service apache2 start
```
2. Stop Apache:
```
sudo systemctl stop apache2
```
or
```
sudo service apache2 stop
```
3. Restart Apache:
```
sudo systemctl restart apache2
```
or
```
sudo service apache2 restart
```
Index file:
/var/www/html
Check :
http://localhost/ or 127.0.0.1
Out put: