通过nginx -t获得

nginx=`nginx -t 2>&1 | grep configuration`
if [ ! -z "$nginx"  ];then
    nginxtmp="${nginx#*file}"
    nginxf="${nginxtmp%test*}"
    echo $nginxf
fi

 

 

相关文章:

  • 2021-08-03
  • 2022-01-15
  • 2022-12-23
  • 2021-10-23
  • 2021-05-17
猜你喜欢
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案