There is a great tutorial on installing Apache, MySQL, PHP on www.digitalocean.com. Below I propose a fast-forward guide.
-
1. Open a terminal. Right click on your desktop, and click Open in terminal. If on Ubuntu server just go to the next step.
-
2. Type the following command and hit ENTER to download package information from all configured sources. You may skip this step if recently done it.
$ sudo apt update
-
3. Type the following command and hit ENTER to install Apache.
$ sudo apt install -y apache2
-
4. Type the following command and hit ENTER to grant firewall access for Apache server.
$ sudo ufw allow in "Apache Full"
-
5. To check functionality of Apache server open a browser and type in address bar.
http://your_ip
If you don't know your IP type in terminal this command and hit ENTER (notice "-I" is a -"capital i"):
$ hostname -I
There you are: you have your own apache web server.