View Nginx installation directory, version number information, and currently running configuration files under Linux

Source: Internet
Author: User

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
    1. 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.
    2. CWD Symbolic link is the process running directory;
    3. EXE symbolic connection is the absolute path to execute the program;
    4. CmdLine is the command line command that is entered when the program is run;
    5. Environ records the environment variables when the process is running;
    6. The FD directory is a symbolic connection of the files that the process opened or used.
    7. ------------------------------------------------------------------
    8. Cat/proc/xxxx/environ |grep PWD
    9. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.