apache2 service Failed on restart - Failed to start apache2.service: Unit not found

16,712

Solution 1

You are using different service of apache.

run this if you are using the same service.

systemctl restart httpd

or

apachectl restart

Solution 2

If you are using latest Linux try following - Check your service name using following command

 # systemctl list-units --type service 

Above command will list all the services, find the right service name you want to restart - use following to restart or reload service e.g I use my restart service httpd24-httpd.service

# systemctl restart httpd24-httpd.service
or # systemctl reload httpd24-httpd.service
Share:
16,712
Mahendra Pratap
Author by

Mahendra Pratap

I have been working as a Software developer using various technology Like PHP, React js, Express js, , React native, GraphQl, Laravel and Wordpress for 6 years. I also lead the team and projects. I write clear, reusable code. I believe in technology.

Updated on June 16, 2022

Comments

  • Mahendra Pratap
    Mahendra Pratap 3 months

    when I try to restart the apache server I got following response.

    Redirecting to /bin/systemctl start apache2.service

    Failed to start apache2.service: Unit not found.