DirectAdmin Main IP Change

Do please make a backup of all the files mentioned here, so that if anything go 

wrong on the process we could safely undo the changes.

 

1: edit  /etc/sysconfig/network-scripts/ifcfg-eth0  and replace the old main IP with  new IP.  // assuming eth0 as the primary Device

2: connect the server  through LAN IP or via KVM and then restart the eth0 device

>> ifdown eth0

>> ifup eth0

3: Restart IP service

>> /etc/init.d/startips restart

 

4: execute IPswap command

/usr/local/directadmin/scripts/ipswap.sh old IP new IP          //This will replace all the old IP entries with new1

 

5: Update Licence

>>  /usr/local/directadmin/scripts/getLicense.sh uid lid//uid and lid can be found in “/usr/local/directadmin/scripts/setup.txt”

 

And restart all the services in server.

Advertisements

Bandwidth Reset in Directadmin

Follow the steps

============

echo ‘action=reset&value=USERNAME&type=user’ >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
echo “” > /var/log/httpd/domains/DOMAIN.bytes
echo ‘action=tally&value=all’ >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

Install mod page speed in Direct Admin

“mod_pagespeed speeds up your site and reduces page load time. This open-source Apache HTTP server module automatically applies web performance best practices to pages, and associated assets (CSS, JavaScript, images) without requiring that you modify your existing content or workflow.”

 

Steps to install

cd /root
yum install at
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm

rpm -i --nodeps mod-pagespeed-stable_current_x86_64.rpm


Now we have to edit some files.

/etc/httpd/conf/extra/httpd-includes.conf
add this line: Include /etc/httpd/conf.d/pagespeed.conf

/etc/httpd/conf/httpd.conf
remove this line or comment it: Include conf/extra/httpd-deflate.conf

Make sure there is no ‘setoutputfilter’ line in your .htaccess file, this will interfere with mod_pagespeed.

Now restart httpd and see if you’ve got the module loaded:

 

 

service httpd restart
apachectl -t -D DUMP_MODULES

Check if you see “pagespeed_module (shared)” loaded.