apache 2 restart centos code example
Example 1: centos stop apache
systemctl restart httpd.service
systemctl start httpd.service
systemctl stop httpd.service
Example 2: how to stop a web server linux
# how to stop a web server linux
sudo service apache2 stop