Nginx – Unit nginx.service is masked

Upgraded a Nginx Server to the latest 1.15.x, but hits the following error message :

Terminal

$ sudo service nginx status
* nginx.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)

$ sudo service nginx restart
Failed to restart nginx.service: Unit nginx.service is masked.

Solution

To solve it, just unmask with this : sudo systemctl unmask nginx.service

Terminal

$ sudo systemctl unmask nginx.service

References

  1. How to Manage Systemd Services on a Linux System
  2. systemd: Masking units

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

avatar