要查看nginx所在目錄,可以使用以下命令:
which nginx
whereis nginx
cat /etc/nginx/nginx.conf | grep root
通過以上命令可以查看nginx所在的目錄。