How to check the directory where Nginx is located in Linux?
To view the directory where nginx is located, you can use the following command:
- Find the path of the nginx binary file using the which command.
which nginx
- Use the whereis command to locate the installation directory of nginx.
whereis nginx
- View the directory specified in the configuration file of nginx.
cat /etc/nginx/nginx.conf | grep root
You can check the directory where nginx is located using the above command.