linux

Noting Various Ways to Start Apache Web Server

In the PHP programming language, there are several ways to start the Apache server, so I want to note this.

Shou Arisaka
1 min read
Nov 18, 2025

In the PHP programming language, there are several ways to start the Apache server, so I want to note this.

Image

There are several ways to start Apache, which is familiar as a server for PHP and other languages. It seems to vary by distribution and version.

/etc/init.d/apache2 status
systemctl status apache2
apache2ctl status

sudo /etc/init.d/apache2 status
sudo systemctl status apache2
sudo apache2ctl status

The above six are basic ways to execute Apache commands.

For WSL bash on Ubuntu 16.xx, it would be sudo /etc/init.d/apache2 status.

When using, replace status with restart, stop, or start.

Be careful.

To install Apache:

Building a Local Development Environment with Apache and PHP7.0 on Ubuntu 16.04

Share this article

Shou Arisaka Nov 18, 2025

๐Ÿ”— Copy Links