How to install Apache on Ubuntu 20.04 LTS

How to install Apache on Ubuntu 20.04 LTS

To install Apache on Ubuntu 20.04 LTS, follow these steps:

  1. Update the package manager index:
    sudo apt update
  2. Install Apache:
    sudo apt install apache2
  3. Enable Apache to start at boot time:
    sudo systemctl enable apache2
  4. Start Apache:
    sudo systemctl start apache2

You can verify the installation by accessing a web browser and visiting http://localhost. This should display the Apache welcome page.

Apache is a popular open-source web server that can be used to host websites and applications. It is easy to install and configure, and it is highly customizable through the use of modules.

By default, the Apache document root (the directory where your website files are stored) is located at /var/www/html. You can place your website files in this directory, and they will be accessible through a web browser.

Note: If you are using a firewall, you may need to allow access to the Apache web server through the firewall. On Ubuntu 20.04, the firewall is managed by UFW (Uncomplicated Firewall). To allow Apache traffic, you can use the following command:
sudo ufw allow in "Apache Full".

Created Time:2017-10-16 14:38:46  Author:lautturi