ci: add more detailed debugging for HTTP 500 errors

This commit is contained in:
Ollama
2026-05-13 23:12:22 +02:00
parent 8172dc23f7
commit 65fdea0807

View File

@@ -72,9 +72,14 @@ jobs:
echo "Apache is responding correctly"
elif [ "$HTTP_CODE" = "500" ]; then
echo "HTTP 500 - Application error. Checking logs..."
sudo tail -50 /var/log/apache2/ospos_error.log 2>/dev/null || true
echo "=== Apache error log ==="
sudo tail -50 /var/log/apache2/error.log 2>/dev/null || true
echo "---"
echo "=== OSPOS writable/logs ==="
sudo ls -la /var/www/ospos/writable/logs/ 2>/dev/null || true
sudo cat /var/www/ospos/writable/logs/*.log 2>/dev/null | tail -50 || true
echo "=== .env file ==="
sudo cat /var/www/ospos/.env 2>/dev/null | grep -v "^#" | head -20 || true
echo "=== Response body ==="
curl -s http://localhost/ | head -100
exit 1
else