How to install Apache on Ubuntu 18.04


  1. Start by updating your software packages and installing Apache web server


$ sudo apt update

$ sudo apt install apache2


    2. The Apache server should now be started automatically and you can check if it is running by the following commands:

$ sudo systemctl status apache2 


    3. If you have a Firewall on the server, enable port 80 and 443 so you can allow the client to accept connections and be able to open websites. 

$ sudo ufw allow 80/tcp

$ sudo ufw allow 443/tcp

$ sudo ufw reload 


  1. Verify the server is working properly by opening the website (or localhost if it is a local server)



Was this article helpful?
0 out of 0 found this helpful

Have more questions? Contact our support instantly via Live Chat