in

LinuxLinux

How to Start, Stop & Restart Apache on CentOS with Commands

Commands to Start, Stop & Restart Apache on CentOS

Restart Apache Server on CentOS

R

estart Apache CentOS: Apache is one of the best server and mainly used as stack software LAMP (Linux, Apache MySQL & PHP). Follow the instructions to install LAMP stack on Ubuntu 18.04 here. In this article, we added the information about how to do start, stop & restart apache server on CentOS.

Jump To:

Restart Apache Server using Systemctl Command:

The most commonly used command to restarting apache server on CentOS is,

$sudo systemctl restart httpd.service

The above command will restart your apache server on CentOS. The best and most working Apache Restarting command.

Restart Apache Server using Apachectl Command:

The most commonly used apchectl command to restart httpd apache server on CentOS is,

$sudo apachectl –k restart

Command to Stop the Apache Service:

$apachectl –k stop

The above command will stop the Apache service.

Command to Stop the Apache Service Gracefully:

$apachectl –k graceful–stop

The above command will stop the Apache Service gracefully.

Start, Stop & Restart Apache Server Commands with Sytmctl:

Command to Start the Apache Server:

$sudo systemctl start httpd.service

Command to Stop the Apache Server:

$sudo systemctl stop httpd.service

Command to Refresh the Apache Server:

$sudo systemctl reload httpd.service

These are the commands mainly used to start, stop and restart apache server on CentOS.

Verdict:

That’s it. You can use the above commands to restart the apache server on CentOS. If you have any queries related to this topic and then comment us below.

Check this too  10 Interesting Usages of "!" Operator in Linux Commands
Article Review
  • Article Explanation
  • Commands Provided
  • Alternative Commands
4.9

Summary

For more articles, kindly visit our HomePage

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Jim Moriarty

Hello, Am Jim from Arizona, Big Fan of Holmes. Server-side handler, Network Engineer & currently working for Tec Robust. I write a server-based article.

Contact me:
tecrobust [@] gmail.com
Sub: Message to Jim.

WhatsDesk for Ubuntu

Whatsdesk Ubuntu: How to install Whatsdesk on Ubuntu 18.04 & 19.04

Install WordPress Manually on CPanel

How to install WordPress using CPanel Manually from the Scratch!