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
The previous article introduced how Vue can reali...
download MySQL official download, select Windows ...
Background-image is probably one of those CSS pro...
There was a problem when installing the compresse...
Table of contents MySQL Client/Server Protocol If...
1. What is phantom reading? In a transaction, aft...
Everything needs a foundation. To build a house, ...
Commonly used commands for Linux partitions: fdis...
Error scenario Use the mysql command in cmd to ad...
This article example shares the specific code of ...
Table of contents JSX environment construction In...
p>Manually start in "Services" and i...
1. Introduction Presto is an open source distribu...
1. Accessing literals and local variables is the ...
This article shares the specific code of JS to ac...