This topic describes common commands for starting and stopping Nginx In Ubuntu. During the development process, we often modify the Nginx configuration file. Each time we modify the configuration file, we can first test whether the modified configuration file is correct. The following command can be used: serviceng‑t-c/alidata/server/nginx/conf/nginx. conf, of course, you must switch to your nginx path before executing the command. If the following result is printed, the modification is
This topic describes common commands for starting and stopping Nginx In Ubuntu. During the development process, we often modify the Nginx configuration file. Each time we modify the configuration file, we can first test whether the modified configuration file is correct. The following command can be used:
Service nginx-t-c/alidata/server/nginx/conf/nginx. conf
Of course, you must switch to your nginx path before running the command. If the following result is printed, the configuration is correct. Otherwise, the configuration is incorrect.
Of course, this only means that your Configuration File Syntax is correct. You have to test the specific business.
To make the configuration take effect, you do not need to disable the ngnix service. You only need to restart the service and run the following command:
Service nginx-s reload
1. Run nginx
See Ubuntu 14.04 install the latest stable version Nginx 1.6.0 http://www.linuxidc.com/Linux/2014-08/105422.htm
Run nginx.
/Etc/init. d/nginx
You can run this command (the premise is to copy the running script to the/etc/init. d directory according to the practice in installing nginx articles)
2. query nginx Processes
Ps-ef | grep nginx
The master in the green box in the figure indicates that the process is the main process of nginx.
3. Stop nginx
Stop Nginx:
Kill-QUIT master process number
In this example, kill-QUIT 30536
Of course, there is also a general command to stop the process, that is, the brute force stop.
Kill-9 process no.
Kill a process. Check whether the process still exists. After each kill operation is completed, it is OK.
CentOS 6.2 Deployment Nginx + MySQL + PHP http://www.linuxidc.com/Linux/2013-09/90020.htm
Build a WEB server http://www.linuxidc.com/Linux/2013-09/89768.htm with Nginx
Build a Web server http://www.linuxidc.com/Linux/2013-09/89692.htm Based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5
Nginx Performance Tuning http://www.linuxidc.com/Linux/2013-09/89656.htm in CentOS 6.3
Configure Nginx to load ngx_pagespeed module http://www.linuxidc.com/Linux/2013-09/89657.htm under CentOS 6.3
CentOS 6.4 install and configure Nginx + Pcre + php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx installation configuration use notes http://www.linuxidc.com/Linux/2014-07/104499.htm
Nginx log filtering using ngx_log_if does not record specific log http://www.linuxidc.com/Linux/2014-07/104686.htm
Nginx details: Click here
Nginx: Click here
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-04/115787.htm