nginx 的使用—- 记录下常用的步骤和工具 查看nginx使用了哪些module nignx -V

/usr/local/etc/nginx/nginx.conf (配置文件路径)

/usr/local/var/www (服务器默认路径)

/usr/local/Cellar/nginx/1.8.0 (安装路径)

/usr/local/var/log/nginx (log路径)

ng教程 [ng参考](https://my.oschina.net/leejun2005/blog/494248)


:https://blog.csdn.net/yqh19880321/article/details/70478827?utm_source=copy

nginx 本地的启动

you just can run services on ports below to 1024 as sudo. 防火墙的设置,以便服务能被ab和slowhttp访问 sudo /usr/libexec/ApplicationFirewall/socketfilterfw –add /usr/local/Cellar/nginx/1.4.4/bin/nginx sudo /usr/libexec/ApplicationFirewall/socketfilterfw –unblockapp /usr/local/Cellar/nginx/1.4.4/bin/nginx

更简单的启动方法:nginx nginx -h nginx -s stop

/usr/local/var/log/nginx log的位置

ng在本地80端口跑 https://stackoverflow.com/questions/35230971/nginx-cannot-listen-on-port-80-only-port-8080-works-on-osx-10-11

brew services start nginx https://stackoverflow.com/questions/35230971/nginx-cannot-listen-on-port-80-only-port-8080-works-on-osx-10-11

屏蔽掉界面上的nginx版本

Don’t show the Nginx version number (in error pages / headers)

Set the server_tokens statement to off in your global configuration file. server_tokens off; https://linux-audit.com/hiding-nginx-version-number/