View the nginx configuration file path Through nginx -t The original function of the nginx -t command is to verify whether there are any abnormalities in the format and configuration of the nginx configuration file. This command will output the path and verification results of the nginx configuration file. In the output results, you can find the address of the current nginx loaded configuration file, as shown below: nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful From this we can see that the nginx configuration file is in the folder /etc/nginx/nginx.conf Use ps -ef | grep nginx If the loading path of the nginx configuration file is explicitly configured during the nginx startup process, you can easily see the current configuration file loading path in this way Use the locate command to search If the locate command is installed on the server, you can use the locate nginx.conf command to search, but if there are multiple nginx.conf files, it is difficult to determine which nginx configuration file is loaded. Search through the nginx -V command You can see all the configuration information during installation through the nginx -V command. By looking for the --conf-path configuration information inside, you can find the path of the corresponding configuration file, as shown below: nginx -V nginx version: nginx/1.12.2 built by gcc 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC) built with OpenSSL 1.0.2k-fips 26 Jan 2017 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --add-module=/usr/local/src/headers-more-nginx-module-0.33 --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E' View nginx resource file path Through the nginx -V command Use the nginx -V command, and then find the --prefix= configuration returned in the command. The path corresponding to the configuration is the path of the nginx resource file. This is the end of this article about how to view the nginx configuration file path and resource file path. For more relevant nginx configuration file path content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: JavaScript to achieve dynamic color change of table
>>: Vue uses the Element el-upload component to step on the pit
mysql efficient query MySQL sacrifices group by t...
I just tried it on IE6, and it does show the toolb...
In many cases, you need to process the background...
Table of contents Preface Prepare Summarize n way...
Table of contents Preface 🍹Preparation 🍲vue3 usag...
As shown below: As shown above, just replace it. ...
The default table name is base_data and the json ...
It is almost a standard feature for websites nowa...
Mac uses Shell (Terminal) SSH to connect to the r...
Declaring variables Setting Global Variables set ...
This article shares with you how to use Vue to lo...
Written in front When we operate the database in ...
Before talking about the structural markup of web...
Table of contents 1. Always use key in v-for loop...
the difference: 1. InnoDB supports transactions, ...