摘要:
#!/bin/bash confs=`ls /etc/nginx/conf.d/cms_vhosts/` cd /etc/nginx/conf.d/cms_vhosts for log in $confs;do name=`echo ${log} |awk -F '.' '{print $1}'` sed -i "/root/a\error_log /zz_data/nginx_l... 阅读全文
摘要:
#!/bin/bash #在 servername 域名 字符串后面添加指定字符串 servername=`grep ServerName httpd-vhosts.conf |awk '{print $2}'` for conf in $servername;do sed -i "/ServerName $conf/a\ErrorLog "logs/${conf}_error.l... 阅读全文