How to start, stop and restart apache2 service (daemon) in Devuan Linux running on OpenRC?

Written by Administrator on Tuesday May 5, 2020

My Devuan Linux system is running with OpenRC init system, that's why I cannot user systemctl command. Instead of this, I'm calling init.d command and can start, stop, restart and get status information regarding all running services. For example, I've installed Apach2 server and I want to stop it. Then I run following command, stopping Apach2:

$ /etc/init.d/apache2 stop

output:

[ ok ] Stopping Apache httpd web server: apache2.

It will stop Apache2 from running. We can check it this way:

$ /etc/init.d/apache2 status
/etc/init.d/apache2 status
[FAIL] apache2 is not running ... failed!

Starting Apache2 server on Devuan

Ok, let's start apache2 on our Devuan system:

$ sudo /etc/init.d/apache2 start

output:

[....] Starting Apache httpd web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
. ok