nginx重启

摘要:
方法二:在启动命令-c前加-t2、重启Nginx服务方法一:进入nginx可执行目录sbin下,输入命令./nginx-sreload即可方法二:查找当前nginx进程号,然后输入命令:kill-HUP进程号实现重启nginx服务
转载自:https://www.cnblogs.com/codingcloud/p/5095066.html 启动

启动代码格式:nginx安装目录地址 -c nginx配置文件地址

例如:

[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
停止

nginx的停止有三种方式:

  • 从容停止

1、查看进程号

[root@LinuxServer ~]# ps -ef|grep nginx

nginx重启第1张

2、杀死进程

[root@LinuxServer ~]# kill -QUIT 2072

nginx重启第2张

  • 快速停止

1、查看进程号

[root@LinuxServer ~]# ps -ef|grep nginx

nginx重启第3张

2、杀死进程

[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132

nginx重启第4张

  • 强制停止

[root@LinuxServer ~]# pkill -9 nginx
重启

1、验证nginx配置文件是否正确

方法一:进入nginx安装目录sbin下,输入命令./nginx -t

看到如下显示nginx.conf syntax is ok

nginx.conf test is successful

说明配置文件正确!

nginx重启第5张

方法二:在启动命令-c前加-t

nginx重启第6张

2、重启Nginx服务

方法一:进入nginx可执行目录sbin下,输入命令./nginx -s reload即可

nginx重启第7张

方法二:查找当前nginx进程号,然后输入命令:kill -HUP 进程号 实现重启nginx服务

nginx重启第8张

免责声明:文章转载自《nginx重启》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇VMware虚拟机几个常用文件夹介绍狼人杀规则下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

部署基于.netcore5.0的ABP框架后台Api服务端,以及使用Nginx部署Vue+Element前端应用

前面介绍了很多关于ABP框架的后台Web API 服务端,以及基于Vue+Element前端应用,本篇针对两者的联合部署,以及对部署中遇到的问题进行处理。ABP框架的后端是基于.net core5.0 的Asp.net core 应用,因此和常规的Asp.net core 应用部署一样;而Vue+Element前端应用则是基于nodejs的应用,部署方式又...

nginx上传模块—nginx upload module-

一. nginx upload module原理 官方文档: http://www.grid.net.ru/nginx/upload.en.html Nginx upload module通过nginx服务来接受用户上传的文件,自动解析请求体中存储的所有文件上传到upload_store指定的目录下。这些文件信息从原始请求体中分离并根据nginx.conf...

ELK批量删除索引

一、存在问题 用了一段时间elk发现如果索引长时间不删除,elk会越来越慢,重启elasticsearch服务器节点之前同步时间也会很长 二、解决方法(定期删除索引) 1.在elasticsearch节点上使用curl -XGET 'http://192.168.X.XX:9200/_cat/shards'查看索引 [root@192-168-x-x sc...

client intended to send too large body

2012/11/14 19:15:20 [error] 16038#0: *1281 client intended to send too large body: 1797176 bytes, client: 10.96.54.125, server: localhost, request: "PUT /svn/repos/!svn/txr/44-1i/...

nginx proxy_set_header

https://docs.min.io/docs/setup-nginx-proxy-with-minio.html      proxy_set_header X-Real-IP $remote_addr;   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;   proxy_set...

[Linux] nginx记录多种响应时间

官网介绍$request_time – Full request time, starting when NGINX reads the first byte from the client and ending when NGINX sends the last byte of the response body$upstream_connect_tim...