17

When I try to restart apache2 by using the command:

sudo service apache2 restart

It gives me this error:

Failed to restart apache2.service: Unit apache2.service is masked.

Is this a hosting-related problem?

Zanna
  • 72,312
Vitalynx
  • 173

1 Answers1

35

A masked service is used to prevent a unwanted start of this service. If you are sure that Apache2 shouldn't be masked, you can just unmask and then restart your service with:

sudo systemctl unmask apache2
sudo service apache2 restart
ob2
  • 3,653