mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Consolidate nginx docs and scripts, update paths
This commit is contained in:
24
nginx/scripts/fix-paths.sh
Normal file
24
nginx/scripts/fix-paths.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Fix shared library paths for production deployment
|
||||
|
||||
echo "🔧 Fixing shared library paths for production..."
|
||||
|
||||
cd /var/www/html
|
||||
|
||||
# Fix paths in PHP files
|
||||
find . -maxdepth 1 -name "*.php" -type f -exec sed -i "s|__DIR__ \. '/\.\./\.\./shared/|__DIR__ . '/shared/|g" {} \;
|
||||
|
||||
echo "✓ Updated paths in:"
|
||||
echo " - index.php"
|
||||
echo " - memoire.php"
|
||||
echo " - search.php"
|
||||
echo " - test_db.php"
|
||||
|
||||
# Test if it works
|
||||
echo ""
|
||||
echo "🧪 Testing..."
|
||||
php -r "require_once '/var/www/html/shared/Database.php'; echo 'Database.php loads successfully\n';"
|
||||
|
||||
echo ""
|
||||
echo "✅ Path fix complete!"
|
||||
echo "Try: curl http://localhost/"
|
||||
Reference in New Issue
Block a user