宝塔批量替换404,index.html

宝塔批量替换404,index.html

#/bin/bash
grep -i "#error_page 404 /404.html;" -r /www/server/panel/vhost/nginx/ | awk -F : '{print $1}' | sort | uniq | xargs sed -i 's\#error_page 404 /404.html;\error_page 404 /404.html;\g'
grep -i "index index.php index.html" -r /www/server/panel/vhost/nginx/ | awk -F : '{print $1}' | sort | uniq | xargs sed -i 's/index index.php index.html/index index.html index.php/g'
# Nginx  

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×