? Troubleshooting Guide
Website Issues
500 Internal Server Error
Causes and Solutions:
- .htaccess errors: Check syntax, comment out rules to test
- PHP errors: Enable error display, check PHP error log
- Permission issues: Ensure correct ownership (web1:client1)
- Memory limit: Increase PHP memory_limit
- ModSecurity: Check if WAF is blocking request
# Check error log
tail -f /var/www/clients/client1/web1/log/error.log
# Test .htaccess
mv .htaccess .htaccess.backup
# Fix permissions
chown -R web1:client1 /var/www/clients/client1/web1/web/
find /var/www/clients/client1/web1/web -type d -exec chmod 755 {} ;
find /var/www/clients/client1/web1/web -type f -exec chmod 644 {} ;
403 Forbidden Error
- Check directory index file exists
- Verify directory permissions
- Check .htaccess deny rules
- Verify IP restrictions
404 Not Found
- Verify file exists in correct location
- Check case sensitivity (Linux is case-sensitive)
- Verify rewrite rules
- Check document root setting
Email Problems
Cannot Send Email
Issue | Solution |
---|---|
Authentication failed | Verify username (full email) and password |
Connection refused | Check firewall, verify ports 25/587/465 |
Relay access denied | Enable SMTP authentication |
TLS error | Check SSL certificate, use correct port |
Cannot Receive Email
- Check MX records point to correct server
- Verify mailbox exists and is active
- Check disk quota not exceeded
- Review spam filter settings
- Check mail logs for errors
# Check mail logs
tail -f /var/log/mail.log
# Test SMTP connection
telnet localhost 25
# Check mail queue
mailq
# Verify MX records
dig MX yourdomain.com
Email Going to Spam
- Configure SPF, DKIM, and DMARC records
- Check server IP reputation
- Avoid spam trigger words
- Ensure PTR record is set
- Test with mail-tester.com
Database Issues
Cannot Connect to Database
# Check MySQL is running
systemctl status mysql
# Test connection
mysql -u username -p
# Check error log
tail -f /var/log/mysql/error.log
# Verify credentials
grep DB_NAME /var/www/clients/client1/web1/web/wp-config.php
Database Performance Issues
- Optimize tables regularly
- Check slow query log
- Increase buffer pool size
- Add indexes to slow queries
- Monitor connections
FTP Connection Problems
FTP Connection Refused
- Verify FTP service is running:
systemctl status pure-ftpd-mysql
- Check firewall allows port 21
- Verify FTP user is active in ISPConfig
- Test with different FTP client
FTP Passive Mode Issues
# Configure passive ports
echo "40000 50000" > /etc/pure-ftpd/conf/PassivePortRange
# Restart FTP
systemctl restart pure-ftpd-mysql
# Open firewall ports
ufw allow 40000:50000/tcp
SSL Certificate Issues
Let's Encrypt Renewal Failed
- Verify domain points to server
- Check port 80 is accessible
- Review /var/log/letsencrypt/letsencrypt.log
- Ensure webroot is correct
- Check DNS propagation
# Manual renewal test
certbot renew --dry-run
# Force renewal
certbot renew --force-renewal
# Check certificate
openssl x509 -in /etc/letsencrypt/live/domain.com/cert.pem -text -noout
ISPConfig Access Issues
Cannot Login to ISPConfig
- Reset admin password:
mysql -u root -p dbispconfig UPDATE sys_user SET passwort = MD5('newpassword') WHERE username = 'admin';
- Check ISPConfig services:
systemctl status ispconfig
- Verify port 8080 is open
- Clear browser cache and cookies
Performance Issues
Slow Website Loading
- Enable caching (opcache, memcached)
- Optimize images
- Enable gzip compression
- Check server load
- Review slow query log
- Consider CDN implementation
# Check server load
top
htop
# Monitor Apache connections
apache2ctl fullstatus
# Check disk I/O
iotop
# Monitor network
iftop
DNS Resolution Issues
Domain Not Resolving
# Check BIND status
systemctl status bind9
# Test DNS resolution
dig @localhost yourdomain.com
# Check zone file syntax
named-checkzone yourdomain.com /etc/bind/pri.yourdomain.com
# Reload DNS zones
rndc reload
Quick Diagnostic Commands
# System resources
free -m
df -h
uptime
# Service status
systemctl status apache2
systemctl status mysql
systemctl status postfix
systemctl status dovecot
# Recent errors
journalctl -xe
dmesg | tail
# Network connections
netstat -tulpn
ss -tulpn
# Process list
ps aux | grep -E 'apache|mysql|php'
Tip: Always check logs first when troubleshooting. Most issues leave clear error messages in the appropriate log files.