Ale*_*vik 37 nginx daemon mac-osx
我已经从 MacPorts 在我的 Mac 上安装并配置了 nginx 服务器
sudo port install nginx
nginx.conf.example
到nginx.conf
并改名mime.types.example
来mime.types
。它工作正常,但我无法阻止它。
我试过了sudo nginx -s stop
,但这并没有停止服务器,我仍然可以看到“欢迎使用 nginx!” 页面在我的浏览器上http://localhost/
;此外,我仍然看到 nginx 的主进程和工作进程ps -e | grep nginx
。
在 Mac 上启动/停止 nginx 的最佳方法是什么?
顺便说一句,我添加了“守护进程关闭”;进入 nginx.conf - 根据各种资源的推荐。
Sav*_*btz 66
# nginx -h
...
-s signal : send signal to a master process: stop, quit, reopen, reload
...
Run Code Online (Sandbox Code Playgroud)
为通过 MacPorts 安装的 Nginx 执行此操作的正确方法:
sudo port load nginx
sudo port unload nginx
OS X 使用 launchd,因此启动/停止守护进程的过程略有不同。
归档时间: |
|
查看次数: |
104136 次 |
最近记录: |