Nginx常用方法

./nginx -v #查看nginx 版本
./nginx  #启动命令
./nginx -s stop #关闭命令
./nginx -s reload #重新加载命令
./nginx -p `pwd`/ -c conf/nginx.conf #指定配置文件启动
./nginx -p `pwd`/ -c conf/nginx.conf -s quit  #nginx指定配置文件的,停止时也需指定参数

#查看nginx 监听了哪些端口
ps -ef  | grep nginx
netstat -anp | grep ${pid} # pid 为上面查询出来的nginx进程号


tar -zxvf nginx-package.tar.gz -C /usr解压到指定目录
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容