Mac下卸载Nginx服务器

Mac下卸载Nginx服务器

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

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

➜  etc brew info nginx
nginx: stable 1.12.1 (bottled), devel 1.13.5, HEAD
HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
https://nginx.org/
/usr/local/Cellar/nginx/1.12.1 (23 files, 1MB) *
  Poured from bottle on 2017-09-12 at 09:28:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/nginx.rb
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx 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  注意目录下你自己的源代码是否还在上面
 
 

猜你喜欢

转载自blog.csdn.net/cangck_x/article/details/77941277
今日推荐