How to setup Apache in Ubuntu Linux 18.04
Sometimes you want to deploy web service in server, trying to use Apache. It will bring many benefits.
- Load balancer — The load balancer distributes incoming traffic across multiple targets, such as Amazon EC2 instances or docker container. This increases the availability of your application.And also you can add one or more listeners to your load balancer.
- Easy to handle SSL certificate and redirect http to https - it's very easy to implement SSL certificate in apache, and make your users transfer data more security.
Before you installing new software, it’s a good idea to refresh your local software package database to make sure you are accessing the latest version.
sudo apt-get update
Start to install apache
sudo apt-get install apache2
type y
to continue the installation.
After the installation, you can open browser and go to http://your-ip-address
If you don't know where is your ip address
use curl ifconfig.co
to get your ip address
The web browser should open a page labeled “Apache2 Ubuntu Default Page,” as in the image below
also you can use service apache2 status
to see apache server status.
Next article I will show you how to write apache config.