DEV Community

loading...
Cover image for How to restart an Apache 2 server or service in Linux?

How to restart an Apache 2 server or service in Linux?

MELVIN GEORGE
Hi, I'm Melvin George, A web developer, and a blogger.
Originally published at melvingeorge.me ・1 min read

Originally posted here!

To restart an apache 2 server or service, we can use the systemctl command-line utility followed by the restart apache2.service command in Linux.

# Restarts Apache 2 service
sudo systemctl restart apache2.service
Enter fullscreen mode Exit fullscreen mode

What is systemctl?

  • The systemctl is a command-line utility that is used to control and manage the systemd services.
  • It is widely used with web server services like Apache, Nginx, etc.

Feel free to share if you found this useful 😃.


Discussion (0)