How to install and start Apache 2 server on Kali Linux 2022

In this article, we have shown how to install and start Apache 2 server on Kali Linux 2022 step by step.

What is Apache Server

Apache Web Server is a software package that turns a computer into an HTTP server. That is, it sends web pages – stored as HTML files – to people on the internet who request them. It is open-source software, which means it can be used and modified freely.

How to install and start Apache 2 server on Kali Linux 2022

1. First, update Kali Linux by running the below command.

sudo apt-get update

How to install and start Apache 2 server on Kali Linux 2022

2. Now, install Apache 2 server using below command:

sudo apt-get install apache2

It will ask us for confirmation, then type Y and hit enter.

Post installation steps for Apache 2 server on Kali Linux 2022

1. Check the status of Apache Server on Linux using below command.

sudo systemctl status apache2

So, Apache2 Server is not started.

2. Start the Apache 2 server using the below command.

sudo systemctl start apache2

3. Now find the ip of server by running ifconfig.

4. Now open the browser and paste the ip like below and hit enter.

http://192.168.1.5/

5. Now go to /var/www/html/and Create a html file (hellworld.html) and paste some tags. In the browser, give like http://192.168.1.5/helloworld.html

Configure Your Firewall for Apache Server:

1. Start by displaying available app profiles on UFW:

sudo ufw show app list

2. Use the following command to allow normal web traffic on port 80:

sudo ufw allow 'Apache'

3. Verify the changes by checking UFW status:

sudo ufw status

Video link:

Leave a Reply

Your email address will not be published. Required fields are marked *