How can you find the location of the configuration file quickly and easily for an unfamiliar server or if you have forgotten where it was installed so long ago? To find out the location of the configuration file, you need to first find the path to the nginx executable file. There are several ways to do this: 1. If the program is running How can you find the location of the configuration file quickly and easily for an unfamiliar server or if you have forgotten where it was installed so long ago? Here are a few ways: 1. If the program is running ps -ef | grep nginx # ps -ef | grep nginx root 29514 1 0 Mar01 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; www-data 29515 29514 0 Mar01 ? 00:00:00 nginx: worker process root 30276 28948 0 09:36 pts/1 00:00:00 grep --color=auto nginx Usually /usr/sbin/nginx 2. The program is not running View the software installation path Query the path where the running file is located Of course there are other ways to query If the rpm package is installed, you can use rpm -qa | grep "name of software or package" to query; Get the configuration file location Through the above methods, we can find the path of the nginx executable file, and then find the location of the configuration file through Nginx's own functions. # /usr/sbin/nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Do you have a better way? Summarize The above is a detailed explanation of the method I introduced to you to find the location of the nginx configuration file. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL 5.7.20\5.7.21 free installation version installation and configuration tutorial
>>: How to set default value for datetime type in MySQL
This article shares the specific code of Vue2.0 t...
Origin: A few days ago, a tester sent a requireme...
Table of contents introduce start Install ① Direc...
1. Install Docker First open the Linux environmen...
Table of contents 1. Parameters that determine ca...
1. Download jdk download address我下載的是jdk-8u221-li...
Preface One of the functions of an interceptor is...
The automatic scrolling effect of the page can be...
Table of contents JavaScript private class fields...
Table of contents How to set cookies Disadvantage...
Table of contents Unary Operators Boolean Operato...
This article shares with you how to use canvas an...
(1) HTML: HyperText Markup Language, which mainly...
Install axios and implement communication Here we...
1. Open the virtual machine and git bash window a...