Jun 1st, 2009
DirectAdmin log files
DirectAdmin log files, where to look for more infornation and error logs:
/var/log/directadmin/errortaskq.log
/var/log/directadmin/system.log
/var/log/directadmin/security.log
DirectAdmin log files, where to look for more infornation and error logs:
To move mysql to another partition.
If you have a /var partition, and if that partition is too small it may fill up quickly. If you want to move the data which is stored in “/var” to another partition, run the following:
This will give you a full readout of all the directories that are using the most space. The directory using the most disk space will appear at the bottom of the list.
One common culprit is mysql (/var/lib/mysql on Redhat). To move that path to another partition, run the following:
Once satisfied that mysqld is running, remove the old data:
Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’ (Using password: YES) in DirectAdmin
When connecting to the MySQL screens in DirectAdmin, if this error appears, that would indicated that the “da_admin” user has not been setup correctly. To resolve this do the following.
1) Make sure the root mysql password works. If you know it, skip to 2). The mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt if it has not been deleted. It’s under the header “mysql=”. If it cannot be found, then mysqld will have to be restarted with the –skip-grant-tables option:
That should start up mysql without the need for a root password. Once in, type
That will reset the root password for you.
Type “killall -9 mysqld_safe; killall -9 mysqld” to shut down mysqld.
Start it up again with
2) Once the root mysql password is set and known, then you can begin the process of resetting the da_admin mysql user. Type:
Then press enter. You’ll be asked for the password. Once in mysql, type:
That should set the password for da_admin in mysql.
3) Now we need to make sure it’s setup correctly for DA to use. Edit /usr/local/directadmin/conf/mysql.conf and set
4) Test it out in DirectAdmin.
How to Add Custom Modules to php in DirectAdmin
If you want to add any extra modules to php, they’ll most likely need to be compiled in. Any module that needs to be compiled in will have a –with-module type flag which will need to be used. To add this flag, run the following:
If you’re using custombuild instead of customapache, use the following configure file(s) then repeat the above steps, but use ‘custombuild’ instead of ‘customapache’ in the path:
Then restart apache
Simple implementation of NAT
Internal network connects to the internet with a dynamic public IP address.
nat:
This table is consulted when a packet that creates a new connection is encountered. It consists of three built-ins: PREROUTING (for altering packets as soon as they come in), OUTPUT (for altering locally-generated packets before routing), and POSTROUTING (for altering packets as they are about to go out).