To run Web applications, we need to install a Web server. The two most widely used used OpenSource web 1
servers in the world are Nginx and Apache. 2
This is the latest Netcraft web server survey. In this lab will install and configure a Apache 3
which provides powerful features and extensive integration with other popular software. 4
Apache is available within Ubuntu default repositories so you can install it by simply running 5
apt update && apt install apache2 6
It's installing it. 7
By default, Apache automatically starts after installation, and to check if it’s running I’m executing: systemctl 8
status apache2 9
And it's active and running. 10
And to check if it's enabled to start a boot time, I'm running systemctl is enabled apache2 11
The next step is to adjust the firewall so that the incoming connection to the Web server are allowed. 12
This is necessary only if there's a firewall enabled. By default on Ubuntu 13
UFW, which comes from uncomplicated firewall, is installed and to check its status run ufw status. 14
It's inactive! If it's inactive, no action is required from you, but if it's active or on ufw allow 15
apache full. 16
Let's connect to the server and check if it's running. The server runs on a public IP address, so 17
we are going to connect to the server from the Internet using both the IP address and the domain name 18
we've just configured in the last lecture. 19
This is the IP address. 20
I'm copying it and pasting it in the browser's address bar. 21
And I see on the recording machine this default Ubuntu Apache Web page. 22
Let's try to connect to the server using its domain. 23
www.crystalmind.academy and it's working as well. 24
I found the IP address of the server by running IP address. 25
If you run the server on a private IP address and set up port forwarding to make it available from the Internet, 26
then you can find the public IP address by running curl-4 27
ident.me. 28
This is the public IP address! So we can connect to the Web server from the Internet using both the 29
servers IP address and its domain name. 30
We'll take a short break 31
and in the next lecture, I'll show you how to set up virtual hosting in order to host multiple websites 32
on a server that has a single static IP address.