If you don’t install nginx yourself or encounter a new environment and don’t know where the nginx configuration file nginx.conf is, here’s how to find it
Methods/steps
-
System environment
-
Nginx version
-
Ps – ef | grep nginx can view to nginx process, but can’t find the configuration file
-
Find the master profile
/usr/sbin/nginx -t
-
You can find the configuration file path
cat /etc/nginx/nginx.conf
-
Go to this directory
-
Conf files in this directory are only valid. Directories one level higher are invalid