Archive for January 2012

Direct admin important back end files

CONF FILES /etc/httpd/conf/httpd.conf
LOG FILES /var/log/httpd/error.log
START/STOP /usr/local/etc/rc.d/httpd start/stop
Scripts /usr/local/directadmin/scripts/

DNS:-
———
CONF FILE /var/named/etc/namedb/named.conf
DB FILES /etc/namedb/domain.db
START/STOP /usr/local/etc/rc.d/named start/stop

MAIL:-
——–
CONF FILE /etc/exim.conf
LOG FILES /var/log/exim/
START/STOP /usr/local/etc/rc.d/exim start/stop
MAIL DIRECTORY /var/spool/virtual/

EMAIL PASSWORD: /etc/virtual/acrilicos.com/passwd
Domain specific Mail settings: /etc/virtual/acrilicos.com

DATABASE:-
—————–

MYSQL PASSWORD: /usr/local/directadmin/conf/mysql.conf

CONF FILE /etc/my.cnf
DATABASE PATH /usr/local/mysql/data/
START/STOP /usr/local/etc/rc.d/mysqld start/stop

FTP:-
——-
CONF FILE /etc/proftpd.conf
START/STOP /usr/local/etc/rc.d/proftpd start/stop

DOMAINS
————————-
/etc/virtual/domains
/etc/virtual/domainowners
Email Alias: /etc/virtual/acrilicos.com/aliases
Email QUota: /etc/virtual/acrilicos.com/quota
/etc/virtual/acrilicos.com/autoresponder.conf
Email account password: /etc/virtual/acrilicos.com/passwd
/etc/virtual/acrilicos.com/filter

/etc/httpd/conf/extra/directadmin-vhosts.conf
emailspoolvirtual=/var/spool/virtual
emailvirtual=/etc/virtual

ftpconfig=/etc/proftpd.conf
ftppasswd=/etc/proftpd.passwd
ftpvhosts=/etc/proftpd.vhosts.conf

mysqlconf=/usr/local/directadmin/conf/mysql.conf
namedconfig=/etc/named.conf
nameddir=/var/named
templates=/usr/local/directadmin/data/templates

Unable to start directadmin + ‘directadmin dead but pid file exists’

Have you ever encountered the below issue with directadmin. If we tried to restart directadmin it will not lsit any error but if you check the status you will see the below error.

/etc/init.d/directadmin status
directadmin dead but pid file exists
You can view the detailed error log by using the below command
tail /var/log/directadmin/error.log
Check the value of your ethernet_dev=eth0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig<br>

2010:07:10-12:44:01: ioctl can’t find the server’s ip address for eth0 : No such device
2010:07:10-12:44:02: The ip of this machine () does not match the ip in the license file.<br>
Check the value of your ethernet_dev=eth0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig<br>

2010:07:10-12:44:11: ioctl can’t find the server’s ip address for eth0 : No such device
2010:07:10-12:44:12: The ip of this machine () does not match the ip in the license file.<br>
Check the value of your ethernet_dev=eth0 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig<br>
Then find out where the main IP is located, using the command ifconfig. If the main ip venet0:0 then edit
vi /usr/local/directadmin/conf/directadmin.conf
and replace the ethernet_dev=eth0 by ethernet_dev=venet0:0.
If the entries are not already there just add ethernet_dev=venet0:0 and then restart direct admin. Thats it!!!

 

Block specific file extensions using .htaccess

Some times you need to block visitor access to specific file types that is not being used in web server.You can make that possible by using .htaccess.Look at the example given below. First of all open .htaccess file in public_html folder(if it is not there just create one). Add the below lines to it.

<Files ~ "\.jpg$">
Order allow,deny
Deny from all
</Files>

The above .htaccess will block the files with extension .jpg . If you want to block multiple file extensions seperate them as follows.

<Files ~ "\.(jpg|inc|3gp|sh)$">
Order allow,deny
Deny from all
</Files>