Rolling back files in WHM
WebHost Manager automatically saves a backup version of the following three files whenever they are changed:
*httpd.conf
*named.conf
*proftpd.conf or pure-ftpd.conf
You can revert to any of the previously saved versions whenever required. The restored version becomes the latest version, and does not delete other versions.
To roll back a file:
Please select a file to rollback:
Click on the Configuration File Rollback link in the Backup menu.
Click on the Back button button to review previous versions. As you change files, the Date field will update and the display area will update with the contents of the different file.
Click on the Restore button to roll back to the displayed version of the file.
cPanel FTP and MySQL General Information and Error Log files
FTP: Logins and General Errors.
General information and login attempts are logged here
FTP Transactions
This is a symbolic link in most cases to /usr/local/apache/domlogs/ftpxferlog, which contains a history ofthe transactions made by FTP users.
MySQL: General Information and Errors
/var/lib/mysql/$(hostname).err
This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log
Exim Message Reception and Delivery log files
Exim writes three different logs, referred to as the main log, the reject log, and the panic log.
/var/log/exim_mainlog ( Linux )
/var/log/exim/mainlog (FreeBSD)
The main log records the arrival of each message and each delivery in a single line in each case. The format is as compact as possible, in an attempt to keep down the size of log files. Two-character flag sequences make it easy to pick out these lines. A number of other events are recorded in the main log. Some of them are optional, in which case the log_selector option controls whether they are included or not. A Perl script called eximstats, which does simple analysis of main log files, is provided in the Exim distribution.
The above log files receives an entry every time a message is received or delivered.
Rejections based on ACLs/Policies: Receives an entry every time a message is rejected based on either ACLs or other policies (for example, aliases configured to :fail:)
/var/log/exim_rejectlog ( Linux )
/var/log/exim/rejectlog (FreeBSD)
The reject log records information from messages that are rejected as a result of a configuration option (that is, for policy reasons).
Most commonly accessed cpanel log files.
When investigating any issue, the first thing you should always do is check the log files, as they generally provide insight as to what’s causing the erroneous behavior.
The following is a break down of the most commonly accessed log files, for cPanel and cPanel managed services:
/usr/local/cpanel/logs/error_log
cPanel logs any error it incurs here. This should always be the first place you look when you encounter errors or strange behavior in cPanel/WHM.
/usr/local/cpanel/logs/license_log
All license update attempts are logged here. If you run into any license errors when logging in, check here.
/usr/local/cpanel/logs/stats_log
The stats daemon (cpanellogd) logs the output from all stats generators (Awstats, Webalizer, Analog) here.
/usr/local/cpanel/logs/access_log
General information pertaining to cPanel requests is logged here (Client Information, Request URI)
Domain zone files
Here is an example for a domain file for yourdomain.com. Please note this is a very generic example and there are more features to it. Please refer to the BIND documentation for help with these features.
;
; BIND data file for yourdomain.com
;
@ IN SOA yourdomain.com. root.yourdomain.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Default TTL
IN NS dns.yourdomain.com.
IN MX 10 mail.yourdomain.com.
www IN A 192.168.100.5
dns IN A 192.168.100.10
mail IN A 192.168.100.20
Any line starting with a ; is a comment line and is ignored by BIND. The first 6 lines are configuration lines for the zone. These lines tell it what the zone is (yourdomain.com) who is responsible for it (root.yourdomain.com which is equivalent to root@yourdomain.com) and a few other things. These other things include a serial number used for keeping track of when it’s updated, how often to refresh the database, how often to retry a zone transfer, when the zone information will expire and a default time to live. *IMPORTANT* Whenever you make changes to the zone file, you MUST increment the serial number. If you do not do this, prolems can occur, especially if you are a primary server supplying information to secondary sites. Most of this information is only used if you have both master and slave systems
The next two lines tell it who the primary DNS server is and who should get the mail for this domain. You can have multiple listings of each of these. To add more dns servers just repeat exactly what is listed changing the dns.yourdomain.com with another dns server. To add another mail server you do the same thing except you have an extra field. The “10″ in the MX line states a priority, lower number being first. What this means is if you have 2 MX listings, one is 10 and one is 20, it will try to deliver the mail to the MX listing with the 10 priority and if it fails it will then go to the MX listing with the 20 priority.
The rest of the zone file lists all your hosts and ips.