The Apache HTTP Server, colloquially called Apache, is a free and open-source cross-platform web server software. Apache is an extremely popular web service that operates a large portion of the websites on the internet. This article will walk you through the simple process of installing Apache, and opening your server’s firewall up to allow web traffic through.
• Linux based server running Debian 10
Before installing Apache we’ll want to make sure your our package management repositories are fully up to date. Run this command to get the latest package listings and update installed packages to their latest versions:
# sudo apt update
After updating, we’ll install Apache, set it to start on boot, and start the service. After which we’ll add a firewall rule to allow port 80 through and make that change persistent:
# sudo apt install apache2 # sudo systemctl start apache2.service # sudo systemctl enable apache2.service # sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT # sudo iptables-save
You should now be able to navigate to the IP address of your server in a browser, and see the Apache test page to confirm you’ve configured the server correctly. This page also will display useful information for further configuring Apache to serve your own custom website or application.