Mac下卸载Nginx服务器

来源:互联网 发布:淘宝图片推荐几款相机 编辑:程序博客网 时间:2024/06/06 09:50

Mac下卸载Nginx服务器

Mac 下使用brew卸载Nginx软件时配置文件和www目录是不会被删除的,有时候需要权限的配置环境作为测试,开发调试的时候不断的修修改改,导致对一下配置没有比较性,

1.使用brew info ngnix查看nginx安装是安装文件的地方,这里我们关心两个地方,一个是www目录,另外一个则是配置目录/etc/nginx

➜  etc brew info nginxnginx: stable 1.12.1 (bottled), devel 1.13.5, HEADHTTP(S) server and reverse proxy, and IMAP/POP3 proxy serverhttps://nginx.org//usr/local/Cellar/nginx/1.12.1 (23 files, 1MB) *  Poured from bottle on 2017-09-12 at 09:28:44From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/nginx.rbDocroot is: /usr/local/var/wwwThe default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so thatnginx can run without sudo.nginx will load all files in /usr/local/etc/nginx/servers/.

同上面的信息能够很清楚的知道Nginx相关的配置文件的信息使用brew uninstall nginx卸载nginx,此时目录服务器上还留有nginx相关的文件,我们需要手动删除www、etc目录

删除配置文件:

/usr/local/etc/nginx 目录
/usr/local/var/www  注意目录下你自己的源代码是否还在上面

原创粉丝点击