Make it dead simple to deploy and run validation scripts on test servers.
NEW FILES:
1. testing/DEPLOYMENT.md
- Complete deployment guide with 5 different methods
- SCP (simplest), GitHub clone, wget/curl, copy-paste, archive
- Step-by-step instructions for both InterWorx and Plesk
- What to expect during execution
- How to review and share results
- Troubleshooting section
- Security notes (scripts are read-only, safe to run)
2. testing/deploy-and-run.sh (AUTOMATED!)
- One command to deploy, run, and retrieve results
- Handles all 4 steps automatically
- Shows live summary of pass/fail/warn counts
- Extracts critical answers automatically
- Error handling and helpful tips
USAGE:
Simple method (manual):
```bash
scp testing/validate-interworx.sh root@SERVER:/tmp/
ssh root@SERVER "/tmp/validate-interworx.sh"
scp root@SERVER:/tmp/interworx-validation-results.txt ./
```
Automated method (one command!):
```bash
cd testing/
./deploy-and-run.sh 192.168.1.100 interworx
# OR
./deploy-and-run.sh plesk-server.com plesk
```
WHAT THE AUTOMATED SCRIPT DOES:
[1/4] Deploys script to server via SCP
[2/4] Runs validation script remotely
[3/4] Retrieves results file
[4/4] Shows summary (PASS/FAIL/WARN counts + critical answers)
OUTPUT EXAMPLE:
```
=======================================================================
VALIDATION SUMMARY
=======================================================================
PASS: 45
FAIL: 0
WARN: 3
✓ All critical tests passed!
=======================================================================
CRITICAL ANSWERS FOUND
=======================================================================
Document roots: /home/USERNAME/DOMAIN/html/
Access logs: /home/USERNAME/var/DOMAIN/logs/access_log
Database prefix: username_ (VERIFIED)
Cron user: testuser
```
SECURITY:
- Scripts are read-only (don't modify system)
- Only exception: cron test (writes then immediately deletes)
- Results in /tmp/ (auto-cleaned on reboot)
- No passwords logged
Ready to deploy to test servers! 🚀
Multi-Panel Testing & Validation Guide
Overview
This directory contains automated validation scripts to test the multi-panel refactoring work on real InterWorx and Plesk servers.
Status: All 38 modules have been refactored for multi-panel support (100% complete)
Supported Panels:
- ✅ cPanel - Fully tested and working (primary platform)
- 🧪 InterWorx - Refactored, needs validation
- 🧪 Plesk - Refactored, needs validation
- ✅ Standalone Apache - Basic support working
Quick Start
On InterWorx Server:
# Copy validation script to InterWorx server
scp testing/validate-interworx.sh root@interworx-server:/tmp/
# SSH to server and run
ssh root@interworx-server
chmod +x /tmp/validate-interworx.sh
/tmp/validate-interworx.sh
# Review results
cat /tmp/interworx-validation-results.txt
On Plesk Server:
# Copy validation script to Plesk server
scp testing/validate-plesk.sh root@plesk-server:/tmp/
# SSH to server and run
ssh root@plesk-server
chmod +x /tmp/validate-plesk.sh
/tmp/validate-plesk.sh
# Review results
cat /tmp/plesk-validation-results.txt
What Gets Validated
InterWorx Validation (validate-interworx.sh)
Tests 10 critical areas:
-
Control Panel Detection
- Verifies
/usr/local/interworxexists - Checks InterWorx version
- Validates installation
- Verifies
-
File System Structure
- Document root:
/home/USER/DOMAIN/html/✅ (verified from official docs) - Home directories:
/home/USER/ - Domain structure detection
- Document root:
-
Log File Locations
- Access logs:
/home/USER/var/DOMAIN/logs/access_log✅ (verified) - Error logs:
/home/USER/var/DOMAIN/logs/error_log✅ (verified) - Transfer logs:
/home/USER/var/DOMAIN/logs/transfer.log✅ (verified)
- Access logs:
-
Domain → User Mapping
- Tests vhost config parsing:
/etc/httpd/conf.d/vhost_*.conf - Validates
ServerName+SuexecUserGrouplookup method
- Tests vhost config parsing:
-
User → Domains Mapping
- Method 1: Parse vhost configs for user
- Method 2: Filesystem discovery
- Compares both methods
-
Database Prefix Pattern
- VERIFIED: Uses
username_prefix (same as cPanel) - Source: https://appendix.interworx.com/current/siteworx/mysql/database-guide.html
- Tests against real databases
- VERIFIED: Uses
-
Cron System
- Validates standard
crontab -u USERworks - Checks
/var/spool/crondirectory
- Validates standard
-
PHP Configuration
- Lists available PHP versions
- Checks PHP-FPM pool configs
- Tests vhost PHP handler settings
-
WordPress Detection
- Searches for
wp-config.phpfiles - Validates path pattern:
/home/USER/DOMAIN/html/wp-config.php - Tests user/domain extraction from path
- Searches for
-
InterWorx CLI Tools
- Checks for nodeworx/siteworx commands
- Lists available CLI tools
Plesk Validation (validate-plesk.sh)
Tests 12 critical areas:
-
Control Panel Detection
- Verifies
/usr/local/psaexists - Checks
pleskcommand availability - Gets Plesk version
- Verifies
-
File System Structure
- Document root:
/var/www/vhosts/DOMAIN/httpdocs/ - Domain root:
/var/www/vhosts/DOMAIN/ - Directory structure validation
- Document root:
-
Log File Locations
- Access logs:
/var/www/vhosts/system/DOMAIN/logs/access_log - SSL access logs:
/var/www/vhosts/system/DOMAIN/logs/access_ssl_log - Error logs:
/var/www/vhosts/system/DOMAIN/logs/error_log - PHP error logs:
/var/www/vhosts/DOMAIN/httpdocs/error_log
- Access logs:
-
Plesk bin Commands
- Tests
plesk bin subscriptioncommand - Lists available commands
- Tests
-
Domain → User Mapping
- Tests
plesk bin subscription --info DOMAIN - Validates
Owner:field extraction - Checks for alternative
Login:field
- Tests
-
User → Domains Mapping
- Tests
plesk bin subscription --list -owner USERNAME - Alternative: filesystem discovery
- Tests
-
Database Prefix Pattern
- TO VERIFY: Appears to use NO PREFIX (bare database names)
- Tests real database list
- Checks for prefix patterns
-
System User for Web Processes
- CRITICAL: Determines what user runs PHP/Apache
- Checks PHP-FPM process ownership
- Tests Apache process user
- Important for cron job management!
-
Cron System
- Tests standard
crontab -u USER - Checks for
plesk bin cron(Plesk custom cron) - TO VERIFY: Which cron system to use?
- Tests standard
-
PHP Configuration
- Checks
/opt/plesk/phpdirectory - Lists PHP versions
- Tests PHP handler per domain
- Checks
-
WordPress Detection
- Searches for
wp-config.phpfiles - Validates path pattern:
/var/www/vhosts/DOMAIN/httpdocs/wp-config.php - Tests domain/owner extraction
- Searches for
-
Apache/Web Server Configuration
- Checks for nginx (Plesk often uses nginx + Apache)
- Validates config directories
Validation Results
Each script produces:
- Color-coded console output (green=pass, red=fail, yellow=warn)
- Detailed results file in
/tmp/ - Test summary with pass/fail/warn counts
Exit Codes:
0= All critical tests passed1= Some tests failed (review required)
What to Look For
✅ PASS - Good!
- All assumptions verified
- Paths exist and match expected patterns
- Commands work as expected
⚠️ WARN - Investigate
- Feature exists but may not be configured yet
- Alternative methods available
- Non-critical differences found
✗ FAIL - Action Required
- Assumption is wrong
- Required file/command missing
- Pattern doesn't match expectations
- Report back to development team!
Critical Items to Verify
InterWorx - RESOLVED ✅
- ✅ File paths (verified from official docs)
- ✅ Database prefix pattern (
username_confirmed) - ⏳ Domain→User lookup (needs real server test)
- ⏳ User→Domains lookup (needs real server test)
Plesk - NEEDS VERIFICATION 🧪
- ❓ Database prefix (appears to be NO PREFIX)
- ❓ System user for cron jobs (www-data? apache? per-domain user?)
- ❓ Cron system (standard vs
plesk bin cron) - ❓ PHP handler selection per domain
- ⏳ All lookup methods (needs real server test)
After Running Validation
1. Review Results File
# InterWorx
cat /tmp/interworx-validation-results.txt | grep -E "PASS|FAIL|WARN" | sort | uniq -c
# Plesk
cat /tmp/plesk-validation-results.txt | grep -E "PASS|FAIL|WARN" | sort | uniq -c
2. Report Issues
If you find FAIL results:
- Copy the full results file
- Note the specific test that failed
- Check if it's a critical assumption (database prefix, file paths, lookups)
- Report back with:
- Panel type and version
- Failed test name
- Actual vs expected behavior
- Full error output
3. Test Actual Modules
After validation passes, test real modules:
Simple Tests First:
# Test log discovery
./modules/security/tail-apache-access.sh
# Test traffic monitoring
./modules/security/web-traffic-monitor.sh
# Test error analysis
./modules/website/website-error-analyzer.sh
Complex Tests:
# Test WordPress cron (most complex)
./modules/website/wordpress/wordpress-cron-manager.sh --list
# Test 500 error tracking
./modules/website/500-error-tracker.sh
Testing Priority
Phase 1: Validation Scripts ⏳
Run validate-interworx.sh and validate-plesk.sh on real servers
Goal: Verify all file paths, commands, and lookup methods work
Phase 2: Simple Module Testing
Test Class B modules (system detection only):
tail-apache-access.shtail-apache-error.shweb-traffic-monitor.sh
Goal: Verify SYS_LOG_DIR detection and log discovery works
Phase 3: Complex Module Testing
Test Class C modules (user/domain management):
website-error-analyzer.sh500-error-tracker.shwordpress-cron-manager.sh(most complex!)
Goal: Verify all lookup methods and multi-panel logic works
Phase 4: Production Readiness
- Fix any issues found
- Update documentation
- Add any missing edge cases
- Performance testing
Known Issues & Limitations
InterWorx
- Database prefix pattern was documented incorrectly (now fixed)
- All other assumptions verified from official documentation
- Needs real server testing to confirm
Plesk
- Database prefix pattern unclear (appears to be NO PREFIX)
- System user for cron jobs unknown (affects wordpress-cron-manager.sh)
- May use custom cron system (
plesk bin cron) - All assumptions need real server verification
All Panels
- Scripts assume bash 4.0+
- Some features are cPanel-only (clearly marked with panel checks)
- Acronis backup modules have not been tested on non-cPanel systems
Next Steps
-
Get access to test servers
- InterWorx test server
- Plesk test server (both RHEL and Debian-based)
-
Run validation scripts
- Execute both validators
- Collect results
- Document any failures
-
Fix issues found
- Update code if assumptions are wrong
- Adjust case statements as needed
- Update REFDB_FORMAT.txt documentation
-
Test real modules
- Start with simple scripts
- Progress to complex scripts
- Test edge cases
-
Update documentation
- Document verified behaviors
- Add platform-specific notes
- Update testing requirements
Contact
For questions or to report validation results, contact the development team with:
- Full validation results file
- Panel type and version
- Any errors or unexpected behavior
- Suggestions for improvements
Last Updated: 2025-11-20 Refactoring Status: 100% complete (38/38 modules) Validation Status: Scripts ready, awaiting test server access