How to Check Apache Status

When you manage a web server on a Linux environment, it’s important to monitor and verify the status of your Apache web server to ensure that your websites and applications are running smoothly. Checking the Apache status helps confirm whether the service is active, stopped, or facing issues, allowing you to maintain optimal server performance. 

Step-by-Step Guide

In this guide, we demonstrate how to check the status of the Apache web server on an Ubuntu instance deployed using a Kamatera cloud server image. Using this environment as an example, you can easily follow the steps to verify whether Apache is running, stopped, or facing any issues, ensuring smooth operation of your web services.

New Server creation

  1. Use SSH to connect to your Kamatera server: SSH (Secure Shell) allows you to securely log in to your server from a terminal or command prompt. 

              Command:

ssh username@your_server_ip

Note: Replace username with your server user (often root) and your_server_ip with the server’s IP address. 
You will then authenticate either with your account password or an SSH key, ensuring a secure session to perform all server operations. 

Once connected, you can run commands to manage Apache and other services. 

ssh code

2. Most modern Linux distributions use systemd to manage services. Running the below command checks whether Apache is running, stopped, or has encountered an error.

Command:

sudo systemctl status apache2

This command gives detailed output including active status, recent logs, and process IDs, helping you identify issues quickly.

SSH code

3. You can control the Apache service using systemctl. Use start to launch Apache if it’s not running, stop to shut it down, and restart to apply configuration changes without rebooting the server. These commands ensure that your web server runs correctly after updates, configuration changes, or troubleshooting.

  • To start Apache:

Command:

sudo systemctl start apache2

sudo system apache code

  • To stop Apache:

Command:

sudo systemctl stop apache2

Note: After stopping Apache, it’s important to confirm its functioning. Running the command below shows the current service status.

Command:

sudo systemctl status apache2

sudo code

  • To restart Apache:

               

Command:

sudo systemctl restart apache2

Note: After starting or restarting Apache, it’s important to confirm its functioning. Running the command below shows the current service status.

Command:

sudo systemctl status apache2

sudo code

Alternatively, open a browser and visit your server’s IP or domain. If Apache is running, you should see the default Apache welcome page, confirming that the web server is serving HTTP requests properly.

Ubuntu Apache 2 Default Page

4. You can check all active Apache processes using the below command. This shows running processes, their process IDs, CPU/memory usage, and associated users. It’s useful for troubleshooting, monitoring resource usage, or ensuring multiple Apache worker processes are running as expected. 

Command:

ps aux | grep apache2

Apache code

By following these steps, you can easily check, manage, and verify the Apache web server status on your Kamatera cloud instance. Regularly monitoring Apache ensures that your web services remain stable, responsive, and secure, helping you maintain smooth performance across your hosted applications and websites.

Have additional questions? Search below: