I just installed nginx 1.9 on a Debian 8 server. nginx is working fine, when I tell it to run, but it won't seem to load nginx automatically on boot.
I have tried numerous init scripts recommended on the internet, but nothing has worked yet. So now I am trying to figure it out with systemctl.
~$ systemctl status nginx ● nginx.service Loaded: masked (/dev/null) Active: inactive (dead) ~$ sudo systemctl try-restart nginx Failed to try-restart nginx.service: Unit nginx.service is masked. ~$ sudo systemctl reload nginx Failed to reload nginx.service: Unit nginx.service is masked. ~$ sudo systemctl reload nginx Failed to reload nginx.service: Unit nginx.service is masked.
Unfortunately, I do not know what "service is masked" means, and I don't know why it is masked.
when I run
the server runs just fine. So then, I looked into unmasking the nginx service.
~$ sudo systemctl unmask nginx.service Removed symlink /etc/systemd/system/nginx.service.
ok cool, now I can start nginx using systemctl. So I checked to see if rebooting would load nginx automatically. But it fails to do so, and I have no idea where to go from here.
Can someone help me get nginx running automatically on boot?