1. View the nginx version

/usr/sbin/nginx -v
Copy the code

2, Check the nginx process: you can check the nginx process, but can not find the configuration file


ps -ef | grep nginx
Copy the code

3. Find the master configuration file

/usr/sbin/nginx -t
Copy the code

You can see a path similar to /etc/nginx/nginx.conf

4. Find the configuration file path

cat /etc/nginx/nginx.conf
Copy the code

Look for the line starting with include in the output and go to the corresponding path to find the configuration file