How to restart the Apache HTTP server (httpd) on Ubuntu 22.04 -

How to restart the Apache HTTP server (httpd) on Ubuntu 22.04

123 views 0 Comments

To restart the Apache HTTP server (httpd) on Ubuntu 22.04, you can use the systemctl command. Here’s how:

  1. Open a Terminal:
    Open a terminal window on your Ubuntu 22.04 system. You can do this by searching for “Terminal” in the applications menu or by pressing Ctrl + Alt + T as a shortcut.
  2. Use systemctl to Restart Apache:
    Type the following command and press Enter:
   sudo systemctl restart apache2

You’ll need to enter your password when prompted since you’re using sudo to execute the command with administrative privileges.

  1. Verify Apache Restart:
    After running the command, Apache will attempt to restart. To ensure that it has restarted successfully, you can check its status by running:
   sudo systemctl status apache2

If Apache has restarted successfully, you should see output indicating that it’s active and running.

That’s it! You’ve now restarted Apache HTTP server on Ubuntu 22.04 using systemctl.

Leave a Reply

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