Troubleshooting

Log locations

ServiceLog
Apache (global)/var/log/apache2/error.log
Apache (per client)/var/www/clients/<client>/logs/
PHP-FPM errors/var/www/clients/<client>/logs/php_errors.log
Postfixjournalctl -u postfix
Dovecotjournalctl -u dovecot
Roundcube/var/log/roundcube/errors.log
Fail2banjournalctl -u fail2ban
Redis/var/log/redis/redis-server.log

Common issues

Website shows default Apache page

a2ensite domain.com.conf && systemctl reload apache2

PHP not executing (shows as text)

PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
systemctl status php${PHP_VER}-fpm
# Check pool exists:
ls /etc/php/${PHP_VER}/fpm/pool.d/

Webmail 500 error

tail -20 /var/log/apache2/error.log
tail -20 /var/log/roundcube/errors.log

Mail not sending / going to spam

postqueue -p                          # check queue
journalctl -u postfix -n 50 --no-pager
# Ensure DKIM is set up:
cx1-add-dkim.sh domain.com
rspamadm dkim_verify -s mail -d domain.com < /dev/null

SFTP connection refused

# Verify key is installed
cat /etc/cx1/authorized_keys/clientname
# Verify client is in cx1clients group
id clientname
# Check SSH config
sshd -T | grep -i chroot

Dovecot config errors

doveconf -n          # show non-default config
doveadm auth test user@domain.com password  # test login

Service restart commands

systemctl restart apache2
systemctl restart php${PHP_VER}-fpm   # replace ${PHP_VER}
systemctl restart mariadb
systemctl restart postfix
systemctl restart dovecot
systemctl restart rspamd
systemctl restart clamav-daemon
systemctl restart redis-server
systemctl restart fail2ban