📅  最后修改于: 2023-12-03 15:20:21.296000             🧑  作者: Mango
This guide will provide a step-by-step process to stop Nginx on Mac using Shell/Bash commands.
Open Terminal on your Mac by pressing Command+Space and typing Terminal
.
Type sudo nginx -s stop
and hit Enter.
Markdown code snippet:
sudo nginx -s stop
If Nginx was running, it will now be stopped. You can verify if Nginx has stopped by running the following command ps aux | grep nginx
. If Nginx has stopped, you will not see any results from the ps aux
command.
Markdown code snippet:
ps aux | grep nginx
(Optional) To ensure that Nginx does not start automatically on your Mac, you can use the launchctl unload
command followed by the path to the Nginx plist file.
Markdown code snippet:
launchctl unload /Library/LaunchAgents/homebrew.mxcl.nginx.plist
Congratulations! You have successfully stopped Nginx on your Mac using Shell/Bash commands.