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:

  1. Find the path of the nginx binary file using the which command.
which nginx
  1. Use the whereis command to locate the installation directory of nginx.
whereis nginx
  1. 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.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds