Skip to content
Follow
Ubuntu Linux

Manage Apache Services on Ubuntu: Start, Stop, Restart, Reload

Richard
Written by
Richard
Jul 3, 2023 Updated Oct 7, 2026 5 min read
How to Install Google Chrome on Ubuntu Linux
How to Install Google Chrome on Ubuntu Linux

Managing Apache on Ubuntu means controlling the web server software that runs in the background and keeps your website online and reachable. You do this with a few terminal commands. Use them to start, stop, restart, or reload the server whenever you need to apply new settings or fix connection problems.

Advertisement

Ubuntu 22.04 LTS and newer versions use systemd, the standard system and service manager, to run these Apache commands. Every command in this guide goes through systemctl, the tool that talks to systemd, so the syntax is the same on every supported release.

⚡ Quick Answer

Control Apache services on Ubuntu using `systemctl` commands. Use `sudo systemctl start apache2` to start, `sudo systemctl stop apache2` to stop, `sudo systemctl restart apache2` to restart, and `sudo systemctl reload apache2` to apply configuration changes without a full stop.

Advertisement

Stop, Start, Restart, and Reload Apache services

You only need basic command-line skills for this. You must be signed in as a user who can run sudo, and Apache must already be installed. The sections below cover each action in turn: start, stop, restart, and reload. Each one also explains when to choose it.

Start Apache services on Ubuntu Linux

Starting Apache brings the server online. Use it after the server has been stopped, or when Apache is not running for some other reason.

  1. Open a terminal. On an Ubuntu desktop, press Ctrl+Alt+T. On a remote server, connect over SSH.
  2. Run `sudo systemctl start apache2`.
  3. Enter your password if sudo asks for it. The characters will not show as you type, which is normal.

When the command succeeds it prints nothing and returns you to the prompt. To confirm the site is up, open the server’s address in a browser. If Apache fails to start, the usual causes are a typo in a configuration file or another program already using the same port.

🐧Bash / Shell
sudo systemctl start apache2

There is also a second way to start the service, shown in the command below. It does the same job as the systemctl command. Use whichever you prefer, but pick one and stick with it so your notes and scripts stay consistent.

Advertisement
🐧Bash / Shell
sudo /etc/init.d/apache2 start

Stop Apache services on Ubuntu Linux

Stopping Apache shuts down the web server and ends its running processes right away. Use it for maintenance, or when you want the site offline on purpose.

  1. Open a terminal.
  2. Run `sudo systemctl stop apache2`.
  3. Enter your password if asked.

Again there is no message on success. Visitors will now get a connection error in their browser, because nothing is answering on the web ports. A stop lasts until you start Apache again or the server reboots, and on a default install Apache starts again at boot.

🐧Bash / Shell
sudo systemctl stop apache2

The alternative command below also shuts down all running Apache processes. The result is the same as with systemctl.

🐧Bash / Shell
sudo /etc/init.d/apache2 stop

Restart Apache services on Ubuntu Linux

Restart Apache on Ubuntu to apply major configuration changes or fix website errors. A restart stops the web server and starts it again in one step. To restart Apache, open your terminal and run the command `sudo systemctl restart apache2`. This shuts down the server and starts it right back up, which briefly takes your site offline for a few seconds.

Advertisement

Restart is the heavier option. Choose it after larger changes, such as enabling a module, or when the site is misbehaving and you want a clean start. Anyone connected at that moment may lose their connection. If the configuration has an error, Apache may not come back up, so check your edits before you restart a live site.

Run the command below to trigger a full service restart. As with the other commands, it prints nothing when it works.

Reload Apache to apply new settings without taking your website offline. Apache can only be reloaded if it is already running. To reload Apache, type `sudo systemctl reload apache2` into your terminal.

A reload tells Apache to read its configuration files again while it keeps serving visitors. Use it for everyday changes, such as editing a virtual host. If the new configuration contains an error, the reload fails and Apache keeps running on its previous settings, so fix the error and reload again.

Advertisement

Apache must be running before you can reload it. If the service is stopped, start it first and then reload.

Use the syntax below to run the reload.

To sum up, you manage the Apache web server on Ubuntu with four operations: start, stop, restart, and reload. Together they control whether your website is available and when your configuration changes take effect. A quick guide to the options:

  • start: Starts the process. Use it when Apache is not running.
  • stop: Stops the process. The site goes offline until you start it again.
  • restart: It will stop the process and start it again. The site is briefly offline.
  • reload: This performs a graceful restart. This stops the child processes only, loads the new config, and starts the child processes. Visitors are affected far less than with a full restart.

Once a restart or reload finishes without an error, your configuration changes are live. Load the site in a browser to check that it behaves as expected.

Advertisement

Related Apache posts:

Conclusion:

  • Knowing how to manage Apache services on Ubuntu Linux is essential for anyone running a web server.
  • Knowing when to start, stop, restart, or reload Apache lets you make changes with as little downtime as possible.
  • For routine configuration changes, a reload is usually enough. Save the full restart for bigger changes or for fixing problems.
  • The related Apache posts above offer further guidance on managing and optimizing Apache on Ubuntu.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

📚 Related Tutorials

How to Install Jitsi Meet on Ubuntu Linux
Ubuntu Linux How to Install Jitsi Meet on Ubuntu Linux
How to Install FossBilling with Nginx on Ubuntu Linux
CMS How to Install FossBilling with Nginx on Ubuntu Linux
How to Change Default Distro in Windows Subsystem for Linux
Windows How to Change Default Distro in Windows Subsystem for Linux
How to Install Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

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