Apache web server is an open source software application that activates your machine to HTTP server. This allows the machine to serve the http request recived from the user. Installing apache web server in Ubuntu is free and easy. This article provides a simple tutorial on installing apache web server in Ubuntu 20.04.
Before following this tutorial you should have following requirements.
- System with Ubuntu 20.04.1 LTS
- Root Access
- Internet Connection
Table of Content
- Step 1: Installing Apache Web Server In Ubuntu
- Step 2: Configure Your Firewall
- Step 3: Checking Status Of Apache Web Server
- Step 4: Configuring Your Apache Web Server
Step 1: Installing Apache Web Server In Ubuntu
Apache web server is a default software available in Ubuntu repositories. So, we can install it with a few commands. Before installing apache first make sure your system is up to date.
Now, install apache in your system
Step 2: Configure Your Firewall
Apache web server runs at default port 80. After apache is installed we need to allow port 80 for everyone from UFW firewall. For that, check the available ufw application list.
Now use the below command to allow Apache.
Verify the changes made.
Step 3: Checking Status Of Apache Web Server
After configuring your firewall, now check the status of the server with ‘systemctl’ command.
Access your web server to configure that the server is running properly from your browser. Enter the url
If you are in your local machine enter
In my case, my machine address is http://184.108.40.206/. You will see the default Ubuntu 20.04 apache page which means your server is running properly.
Step 4: Configuring Your Apache Web Server
It is important to know how to control your server system. Controlling the server system means stop, start and restart your server.
Start apache web server.
Stop apache web server.
Restart apache web server.
Enable apache web server. This makes apache to run automatically when you reboot your system.
Disable apache web server. This stops apache to run automatically when you reboot your system.