This article covers how to perform installation and configuration of Apache web server on Debian 10.
Also, you will learn how to create virtual hosts on an Apache server and troubleshoot errors. These steps are almost the same for Ubuntu and LinuxMint distributions.
Apache HTTP Server is a free and open-source web server that delivers web content through the internet. It is commonly referred to as Apache and after development, it quickly became the most popular HTTP client on the web.
On most systems if you installed Apache with a package manager, or it came preinstalled, the Apache configuration file is located in one of these locations: /etc/apache2/httpd. conf. /etc/apache2/apache2.
Debian/Ubuntu Linux Specific Commands to Start/Stop/Restart Apache:
1. Restart Apache 2 web server, enter: # /etc/init.d/apache2 restart. $ sudo /etc/init.d/apache2 restart.
2. To stop Apache 2 web server, enter: # /etc/init.d/apache2 stop.
3. To start Apache 2 web server, enter: # /etc/init.d/apache2 start.
To check running status of LAMP stack:
1. For Ubuntu: # service apache2 status.
2. For CentOS: # /etc/init.d/httpd status.
3. For Ubuntu: # service apache2 restart.
4. For CentOS: # /etc/init.d/httpd restart.
5. You can use mysqladmin command to find out whether mysql is running or not.