1. #!/bin/bash
    2. #cd /usr/local/src/vhost_1
    3. #cd /usr/local/src/vhost_zuixin
    4. cd /www/wdlinux/nginx/conf/vhost
    5. for i in `cat /opt/dirname.txt`;do
    6. sed -i "75a\ access_log /www/web_logs/two_domain_logs/${i}.log; \n #error_log /www/web_logs/two_domain_logs/error/${i}.error.log;" ${i}.conf
    7. sed -i "33a\ access_log /www/web_logs/two_domain_logs/m.${i}.log; \n #error_log /www/web_logs/two_domain_logs/error/m.${i}.error.log;" m.${i}.conf
    8. #zuixin
    9. #sed -i "79a\ access_log /www/wwwlogs/two_domain_logs/${i}.log;" ${i}.conf
    10. #sed -i "75a\ access_log /www/wwwlogs/two_domain_logs/m.${i}.log;" m.${i}.conf
    11. done