Closed vm10k closed 8 months ago
I can't repro this issue. The curl command used in the script supports http sites as well. Example:
curl --write-out '%{http_code}' --silent --output /dev/null http://www.testingmcafeesites.com/
When i tried it using my website It didn't work but my site is already working fine http://Kazaloon.is-best.net 2023-12-16 08:36, failed 2023-12-16 09:36, failed 2023-12-16 10:35, failed 2023-12-16 11:36, failed 2023-12-16 12:47, failed 2023-12-16 13:36, failed 2023-12-16 14:36, failed 2023-12-16 15:36, failed Also i have little problem with the script, when i open github pages it doesn't display what happened like show green or red, only in logs but not in the github pages
I guess maybe it's because of the SSL?
If you please take a look because I'm counting on it It's a great code and very helpful for me Thanks for replying to me earlier
Update: it turn out the problem isn't with https or http it's about the subdomains or something else i dont know ... Is it possible to make check the subdomain or the subdomain in the url to check it's health?
Detailed error:
Reading ./urls.cfg
kazaloon=http://kazaloon.is-best.net/
elkhabir=http://elkhabir.is-best.net/
v-freelance=http://v.000.pe/public
test=http://www.testingmcafeesites.com/
***********************
Starting health checks with 4 configs:
./health-check.sh: line 30: syntax error near unexpected token `for'
./health-check.sh: line 30: `for (( index=0; index < ${#KEYSARRAY[@]}; index++))'
Error: Process completed with exit code 2.
Detailed error:
Reading ./urls.cfg kazaloon=http://kazaloon.is-best.net/ elkhabir=http://elkhabir.is-best.net/ v-freelance=http://v.000.pe/public test=http://www.testingmcafeesites.com/ *********************** Starting health checks with 4 configs: ./health-check.sh: line 30: syntax error near unexpected token `for' ./health-check.sh: line 30: `for (( index=0; index < ${#KEYSARRAY[@]}; index++))' Error: Process completed with exit code 2.
i was trying to edit the healthcheck.sh multiple times , by the way u can try checking this website : http://kazaloon.is-best.net it will show in logs failed
Your webserver rejects any request with a curl user agent.
curl -v "http://kazaloon.is-best.net"
Will get back an empty response with the server closing the connection. However if I change it to another user agent lke this:
curl -v -A "Mozilla/5.0 Chrome/120" "http://kazaloon.is-best.net"
I get back a valid 200 response
I won't be updating this library with this, but you're free to change the code in your fork. You will need to update Line 37 from:
response=$(curl --write-out '%{http_code}' --silent --output /dev/null $url)
to
response=$(curl --write-out '%{http_code}' --silent -A 'Mozilla/5.0 Chrome/120' --output /dev/null $url)
Closing this issue now.
When i added my http websites It wont run the check for them