Make sure your Ubuntu is up to date and patched.
$ sudo apt update $ sudo apt upgrade
Apache is available within Ubuntu’s default software repositories, making it possible to install it using conventional package management tools. After confirming the installation, apt
will install Apache and all required dependencies.
$ sudo apt install apache2 -y
After that, the Apache2 web server and its all dependencies will be installed on your system. Once installed, verify the version of the Apache server as follows:
$ apache2 -version # OUTPUT Server version: Apache/2.4.41 (Ubuntu) Server built: 2020-08-12T19:46:17
It’s necessary to modify the firewall settings to allow outside access to the default web ports before testing Apache. You should have a UFW firewall configured to restrict access to your server.
# Check UFW status $ sudo ufw status # OUTPUT Status: inactive # List the UFW application profiles by typing: $ sudo ufw app list # OUTPUT Available applications: Apache Apache Full Apache Secure CUPS
There are three profiles available for Apache:
It is recommended that you enable the most restrictive profile that will still allow the traffic you’ve configured. Since we haven’t configured SSL for our server yet in this guide, we will only need to allow traffic on port 80:
# Set Apache as selected profile and check UFW status $ sudo ufw allow 'Apache' #OUTPUT Rules updated Rules updated (v6) $ sudo ufw enable #OUTPUT Firewall is active and enabled on system startup $ sudo ufw status # OUTPUT Status: active To Action From -- ------ ---- Apache ALLOW Anywhere Apache (v6) ALLOW Anywhere (v6)
To start, stop, restart and then find the service status again use the following commands.
# Start the apache2 server $ sudo systemctl start apache2.service # Stop the apache2 server $ sudo systemctl stop apache2.service # Restart the apache2 server $ sudo systemctl restart apache2.service # Reload the apache2 server gracefully $ sudo systemctl reload apache2.service # Find the status of apache2 server $ sudo systemctl status apache2.service
Have fun!
There are many methods for using APIs. In order to understand it better, lets take…
One way to guard against out-of-memory errors in applications is to add some swap space.…
Docker Compose is a tool that allows you to run multi-container application environments based on…
After the creation of development environment your setup fulfills the Shopware 6 requirements. If you…
After the creation of development environment your setup fulfills the Shopware 6 requirements. If you…
To create a development environment in fresh install of Linux - Ubuntu 20.04 (Focal Fossa)…