Script to check all domain
Hi,
I just upgrade all my server php default to 7.3 instead of 5.6, since that i receive many complain of error 500 on some of client website, so now i'm looking a script to check all domain i have so i can check which account are having issue with php 7.3 and i can switch to 5.6 by using .htaccess
Any script out there can do the job ? Please advice.
TQ
-
Something like this (if you want the output to print to a file just a add > filename while calling the script Proabaly be improved but created this real quick #!/bin/bash mkdir /home/activedomains cd /home/activedomains cat /etc/userdomains | cut -d ':' -f 1 | awk '{ print $1}'> /home/activedomains/activedomains.txt for i in `cat /home/activedomains/activedomains.txt` do echo $i ; curl --connect-timeout 3 --write-out "%{http_code}\n" --silent --output /dev/null ${i} done0 -
Thank you @dalem @mesranet let us know if this helped you resolve your issue. 0
Please sign in to leave a comment.
Comments
2 comments