Linux environment, how to determine the Nginx is started with that config file?
Input command line: PS-EF | grep nginx
Press ENTER to appear as a slice:
After the master process is the Nginx directory.
How to view the Nginx version number installed on the server, mainly through the Ngix-V or-v option, see the method as shown:
-V Displays the version of Nginx.
-V Displays the Nginx version, compiler version, and configuration parameters.
How to view the profile of an nginx that is currently running under Linux
- When Linux starts a process, the system creates a PID-named folder under/proc, where there is information about our process, including a file named EXE that records the absolute path, which can be viewed via the LL or LS–L commands.
- CWD Symbolic link is the process running directory;
- EXE symbolic connection is the absolute path to execute the program;
- CmdLine is the command line command that is entered when the program is run;
- Environ records the environment variables when the process is running;
- The FD directory is a symbolic connection of the files that the process opened or used.
- ------------------------------------------------------------------
- Cat/proc/xxxx/environ |grep PWD
- View the absolute path of the command.
Because of problems such as backup, different versions, and so on, there are many Nginx directories on ECS Linux, and the configuration files of the currently running Nginx can be located by the following methods:
1. Look at the Nginx PID, take the usual 80 port as an example:
Netstat-anop | grep 0.0.0.0:80
2. Query the currently running Nginx path with the appropriate process ID (for example: 4562):
Ll/proc/4562/exe
3. After obtaining the Nginx execution path, use the-t parameter to obtain the corresponding profile path for the process, such as:
#/usr/local/nginx/sbin/nginx-t
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful
View the Nginx version number installed on the server http://www.linuxidc.com/Linux/2012-05/60319.htm
CentOS 6.2 Combat Deployment nginx+mysql+php http://www.linuxidc.com/Linux/2013-09/90020.htm
Using Nginx to build a Web server http://www.linuxidc.com/Linux/2013-09/89768.htm
Build linux6.3+nginx1.2+php5+mysql5.5-based Web server whole process http://www.linuxidc.com/Linux/2013-09/89692.htm
CentOS 6.3 under Nginx performance tuning http://www.linuxidc.com/Linux/2013-09/89656.htm
CentOS 6.3 Under the configuration Nginx load ngx_pagespeed module http://www.linuxidc.com/Linux/2013-09/89657.htm
CentOS 6.4 Installation Configuration nginx+pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx installation Configuration Use detailed note http://www.linuxidc.com/Linux/2014-07/104499.htm
Nginx log filtering using ngx_log_if does not log specific logs http://www.linuxidc.com/Linux/2014-07/104686.htm
View Nginx installation directory, version number information, and currently running configuration files under Linux