Install Apache Server on Ubuntu 20.04

Apache Ubuntu

Install Apache on Ubuntu 20.04 by following these steps.

Open a Terminal: Press Ctrl + Alt + T to open a terminal window.

Update Package Lists:

It's a good practice to start by updating the package lists to ensure you have the latest information about available packages:

sudo apt update

Install Apache:

You can install Apache with the following command:

sudo apt install apache2

This command will install Apache along with its dependencies.

Start and Enable Apache Service:

After the installation is complete, start the Apache service and enable it to start on boot:

sudo systemctl start apache2
sudo systemctl enable apache2

This will ensure that Apache starts automatically when the system boots up.

Verify Installation:

You can verify that Apache is running by opening a web browser and navigating to http://localhost. You should see the default Apache page indicating that Apache is installed and working.

If you want to access the server from another device on your network, you can use the IP address of your Ubuntu machine instead of localhost.

Configure Firewall (if necessary):

If you have a firewall enabled, you may need to allow traffic on port 80, which is the default port for HTTP:

sudo ufw allow 80/tcp

If you're planning to use SSL (HTTPS), you'll also need to allow traffic on port 443:

sudo ufw allow 443/tcp

Finally, reload the firewall rules:

sudo ufw reload
Comments
Loading...
Sorry! No comment found:(

There is no comment to show for this.

Leave your comment