2025-10-06 19:37:32 +03:00

29 lines
617 B
Bash

#!/bin/bash
echo "Fixing routes/web.php on server..."
# Update the web.php file
cat > /var/www/html/New-Thanasoft/thanasoft-back/routes/web.php << 'EOF'
<?php
use Illuminate\Support\Facades\Route;
Route::get('/{any}', function () {
return file_get_contents(public_path('index.html'));
})->where('any', '.*');
EOF
echo "✓ Updated routes/web.php"
# Clear and cache routes
cd /var/www/html/New-Thanasoft/thanasoft-back
php artisan route:clear
php artisan route:cache
php artisan config:clear
echo ""
echo "✓ Done! Routes updated and cached."
echo ""
echo "Testing website..."
curl -I http://78.138.58.60/