Corrupt Horde SQL File
If you get a corrupt horde sql file run this: /usr/local/cpanel/bin/update_horde_config –user=dynast7 It’s specific to older server thoughs. Took a sec. Apparently this only happens on older server configurations.
If you get a corrupt horde sql file run this: /usr/local/cpanel/bin/update_horde_config –user=dynast7 It’s specific to older server thoughs. Took a sec. Apparently this only happens on older server configurations.
A nice anti-malware .htaccess file I came accross ## Begin – Rewrite rules to block out some common exploits. # If you experience problems on your site block out the operations listed below # This attempts to block the most common type of exploit `attempts` to Joomla! # # Block out any script trying to…
Read more
tail -f /usr/local/{cpanel,apache}/logs/{error,access}_log
No reports None: v=DMARC1; p=none; sp=none; rf=afrf; pct=100; ri=86400 Reject: v=DMARC1; p=reject; sp=none; rf=afrf; pct=100; ri=86400 Quarantine: v=DMARC1; p=quarantine; sp=none; rf=afrf; pct=100; ri=86400 With reports None: v=DMARC1; p=none; sp=none; ruf=mailto:user@example.com; rf=afrf; pct=100; ri=86400 Reject: v=DMARC1; p=reject; sp=none; rf=afrf; pct=100; ruf=mailto:user@example.com; ri=86400 Quarantine: v=DMARC1; p=quarantine; sp=none; ruf=mailto:user@example.com; rf=afrf; pct=100;
To start a screen: screen -S screenname ^a then d to detatch. Once you want to resume: screen -ls screen -r screenname
Add the user’s username to the end of the command usr/local/cpanel/bin/whmapi1 start_autossl_check_for_one_user username=
Remote backup of user directory and MySQL database that deletes the backup from 4 weeks ago serverLocation=”example.com”; syncLocation=”/media/StorageDrive/example.com.sync/”; saveLocation=”/media/StorageDrive/example.com.backups/”; rsync -a root@$serverLocation:/home/ $syncLocation/home/; ssh root@$serverLocation -t “mysqldump –all-databases” > $syncLocation/mysql.sql; cd $syncLocation; tar -cvzf $saveLocation/$(date +%y-%m-%d).tar . ; rm -f /home/user123/mail-backup-$(date –date=”4 weeks ago” +%y-%m-%d).tar; Local cron backup command for one email account that deletes…
Read more
Check for nginx netstat -lntp | grep nginx Check that apache is not using the same ports netstat -lntp | grep httpd Clear nginx cache ngxconf -u userna5 -rd Rebuid rules You must run this after you change the any nginx config files. This will tell you if there are bad rules. nginx -s reload…
Read more
To check for backups, replace userna5 with the database name ls -la /bkmnt/var/lib/mysql | grep userna5 Replace userna5_db with the database name restore-db userna5_db Check the latest backup for a user ls -la /opt/backup/logs/users/userna5 or cat /opt/backup/logs/users/userna5
Create a php.ini file from the currently loaded one. Make sure you replace ‘http://example.com/’ with the public path of the current directory. cp $(echo “<?php phpinfo(); ?>” > phpinfo.php; wget http://example.com/phpinfo.php -O – | sed ‘s#<head>[^<]*</head>##g’ | sed ‘s#<footer>[^<]*</footer>##g’ | sed ‘s#<script>[^<]*</script>##g’ | sed ‘s#<style>[^<]*</style>##g’ | sed ‘s/<[^>]\+>//g’ | grep -v ‘^$’ | grep “Loaded…
Read more