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
For example, if your current path is /var/log and...
This article uses an example to describe how to c...
Configuration steps 1. Check whether DNS is confi...
[LeetCode] 196.Delete Duplicate Emails Write a SQ...
Canvas is a new tag in HTML5. You can use js to o...
I was bored and sorted out some simple exercises ...
View the IP address of the Container docker inspe...
Let me first explain why the text is not vertical...
<meta name="viewport" content="...
Preface: When designing a table in MySQL, MySQL o...
question: I have a form in Vue for uploading blog...
First way: skip-grant-tables: Very useful mysql s...
Table of contents 1. Constructors and prototypes ...
Table of contents What does the COUNT function do...
Table of contents 1. Initialize the array 2. Arra...