#!/bin/bash
echo "=== Vérification SSL Apache ==="
echo -e "\n1. Sites activés :"
sudo apache2ctl -S
echo -e "\n2. Test syntaxe Apache :"
sudo apache2ctl configtest
echo -e "\n3. Certificats installés :"
sudo certbot certificates
echo -e "\n4. Test redirection ebest.pro :"
curl -I http://ebest.pro 2>&1 | grep Location
echo -e "\n5. Test redirection www.ebest.pro :"
curl -I http://www.ebest.pro 2>&1 | grep Location
echo -e "\n6. Test redirection sylx.fr :"
curl -I http://sylx.fr 2>&1 | grep Location
echo -e "\n7. Test redirection www.sylx.fr :"
curl -I http://www.sylx.fr 2>&1 | grep Location
echo -e "\n8. Test HTTPS ebest.pro :"
curl -I https://ebest.pro 2>&1 | head -n 1
echo -e "\n9. Test HTTPS sylx.fr :"
curl -I https://sylx.fr 2>&1 | head -n 1
echo -e "\n10. Statut Apache :"
sudo systemctl status apache2 --no-pager