How to Add Apache Service to Linux Run Level for Automatic Startup

Modified on Sun, 16 Mar at 1:29 PM

Overview:

In order to run Apache at boot time, we need to add the service in the Linux run level (/etc/init.d) You can to add its init script to the appropriate run level. The init script is typically /etc/init.d/apache2 where you could manually run /etc/init.d/apache2 start to start it.

Applicable platform:

On-Premise Deployment

Steps to add Apache service in the Linux run level:

1. Log in to your ancor server via terminal.

2. Please run the below command to add Apache service at run level,

                sudo update-rc.d apache2 defaults

3. To verify the configuration, please use the below commands and refer the results screenshots.

ls /etc/init.d | grep apache
 



find /etc/rc* -name *apache*

A screen shot of a computer

Description automatically generated


Here after, Apache service will be started automatically at the boot time of an Ancor Server.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article