DirectAdmin user and password
Wed, 06/01/2011 - 16:40 — sandipI've had to test some connectivity issues with pop and imap clients without having access to their account info.
"/etc/virtual/{domain.tld}/pas
Generate a new md5-based password hash:
openssl passwd -1
Edit "/etc/virtual/{domain.tld}/pas
Test login to mail.
Once debugging is finished, restore the file back.
- sandip's blog
- Login or register to post comments
- Read more
suphp-0.7.1 and DirectAdmin
Tue, 06/30/2009 - 16:56 — sandipRecently upgraded server running DirectAdmin to suphp-0.7.1 via the Custombuild. However, got "500 Internal Server Error" on accessing sites running on php5-cgi with log as below:
SecurityException in Application.cpp:511: Unknown Interpreter: php
The solution was to update the suphp.conf file as below:
Edit "/usr/local/suphp/etc/suphp.co
[handlers]
;Handler for php-scripts
x-httpd-php5=php:/usr/local/ php5/bin/php-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
to:
[handlers]
;Handler for php-scripts
x-httpd-php5="php:/usr/ local/php5/bin/php-cgi"r />
;Handler for CGI-scripts
x-suphp-cgi="execute:!s elf"
Note the double quotes for the variables.
Running `./build rewrite_confs` should fix this issue as well.
- sandip's blog
- Login or register to post comments
Upgrading php on DirectAdmin Servers
Fri, 09/07/2007 - 15:26 — sandipDownload the source tar.gz file from php.net and place it in "/usr/local/directadmin/custom
Edit the "/usr/local/directadmin/custom
Then run:
# cd /usr/local/directadmin/customa pache/
# ./build clean
# ./build update
# ./build all
Restart apache when finished.
Migrating sites between DirectAdmin servers
Fri, 02/02/2007 - 10:55 — sandipThese are some basic notes for reference just in case I need to do the migration thing again!!!
Steps taken on the old server
-
Created a new reseller account.
Created sites in the new reseller account as domain.com2 for the domains that needed to be migrated. DA won't let you add the same name twice, which is why I used a different one for the time being. Doing this will setup all the required files/paths needed to use the website.
Copied the files to the new domain.
# cp -pR /home/olduser/domains/domain.c om/* /home/newuser/domains/domain.c om2/
# chown -R newuser:newuser /home/newuser/domains/domain.c om2
# for x in `find /home/newuser/domains/*/public _html -type f -print0 | xargs --null grep -l /home/olduser`; do perl -pi.bak -e 's/\/home\/olduser/\/home \/newuser/g' $x ; done
# cd /etc/virtual
# mv domain.com domain.com.tmp
# mv domain.com2 domain.com
# mv domain.com.tmp domain.com2
Changed user for the imap files.
# find /home/newuser/imap -user olduser | xargs chown newuser:newuser
Renamed the new domains to domain.com from domain.com2.
Logged in as reseller and created a backup.
Created a script and dumped out single databases.
#!/bin/bash
# dbExport.sh
OLD_DB=(
db1
db2
db3
...
)
for ((i=0; i<${#OLD_DB[@]}; i++))
do
mysqldump --opt -u root --password={psswd} ${OLD_DB[$i]} > ./db/${OLD_DB[$i]}.db
done
# find /home/newuser/domains -perm 0777 -type d > 777.txt