失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > Mac/Homebrew查找nginx安装目录和nginx.conf配置文件目录

Mac/Homebrew查找nginx安装目录和nginx.conf配置文件目录

时间:2023-03-29 00:30:15

相关推荐

Mac/Homebrew查找nginx安装目录和nginx.conf配置文件目录

Mac/Homebrew查找nginx安装目录和nginx.conf配置文件目录

1. nginx安装目录

2.nginx.conf配置文件目录

3. 启动/暂停/重载

1. nginx安装目录

$ ps -ef | grep nginx

1

安装目录就在:/usr/local/opt/nginx/bin/nginx,如下

zhangguoyedeMacBook-Pro:nginx zhangguoye$ ps -ef | grep nginx

501 1543 1 0 9 919 ??0:00.04 nginx: master process /usr/local/opt/nginx/bin/nginx -g daemon off;

501 1700 1543 0 9 919 ??0:00.00 nginx: worker process

501 37720 929 0 11:37上午 ttys006 0:00.00 grep nginx

1

2

3

4

2.nginx.conf配置文件目录

$ nginx -t

1

配置文件目录就在:/usr/local/etc/nginx/,如下

zhangguoyedeMacBook-Pro:nginx zhangguoye$ nginx -t

nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok

nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful

1

2

3

3. 启动/暂停/重载

# 启动

$ sudo brew services start nginx

# 暂停

$ nginx -s stop

# 重载

$ nginx -s reload

如果觉得《Mac/Homebrew查找nginx安装目录和nginx.conf配置文件目录》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。