Pre-requisites:
A system with CentOS Stream 9 installed and running
Access to a terminal or command line
Root or sudo privileges
This guide will review the most important and frequently used Apache commands that you should know as a web developer or system administrator.
Installing Apache
dnf install httpd
Start Apache
systemctl start httpd
Stop Apache
systemctl stop httpd
Restart Apache
systemctl restart httpd
Test Apache Configuration
httpd -t
View Apache Status
systemctl status httpd
Check Apache Version
httpd -v
List loaded modules in Apache
httpd -M
Display an overview of the VirtualHosts
httpd -S
Output a short summary of available command line options
httpd -h
List of command line options from the official Apache site