How to set up an Apache server in 2 minutes

Here I have got, How to set up an Apache server in two minutes on most Linux distros

Welcome here But Let’s get straight into the point

Install Apache2

On Arch Linux

sudo pacman -S apache

On Ubuntu and Debian based distros

sudo apt install apache2

On fedora(Didn’t test it)

dnf install httpd

Configuration Of The Server

It has been one minute now, Let’s edit the configuration file
We need to edit /etc/httpd/conf/httpd.conf , I will use nano

sudo nano /etc/httpd/conf/httpd.conf

Two lines we need to look for:
The first one is Listen and replace it with Listen
The second one is DocumentRoot "default/path/to/html" and edit it to the path we need (eg. DocumentRoot "/var/www/html")
Now we’re almost done

Create Index.html file

Now in the path we choose create an index.html file and put this lines in it

<!DOCTYPE html>
        <meta charset="utf-8">
        HI THERE

and go to on your browser, and done

it ‘Should’ be working, leave me a comment if it is
and as someone on the TV once said

Do it

Someone on TV


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s