Fill these in once
macOS doesn't use systemctl. Services you installed with Homebrew are controlled with brew services, for example brew services restart {{service}}.
- Check the service
systemctl status nginxPress q to leave.
- Start, stop or restart itNeeds sudo
sudo systemctl restart nginxSwap restart for start or stop.
- Start it every time the server bootsNeeds sudo
sudo systemctl enable nginx - Read its latest log linesNeeds sudo
sudo journalctl -u nginx -n 50 --no-pagerAdd -f instead of --no-pager to keep watching.
Check it worked
- Check it is running
systemctl is-active nginxIt should say active.
- Check the service
Get-Service nginx - Start, stop or restart itRun as administrator
Restart-Service nginxSwap Restart for Start or Stop.
- Start it every time Windows startsRun as administrator
Set-Service nginx -StartupType Automatic
Check it worked
- Check it is running
(Get-Service nginx).StatusIt should say Running.