Plesk
From Wiki.voidnet.us
[edit] Plesk Logs
web:
/usr/local/psa/admin/logs
mail/ftp xfer
/usr/local/psa/var/log/
[edit] Plesk FTP USER
I have included below the instructions for adding system FTP user account's. First you will need to add the user, to do so simply issue the following command(s) as root:
useradd -s /bin/false johndoe -d /home/johndoe
The "-s /bin/false" portion ensures this user can only ftp into the system and has no shell access. The "-d /home/johndoe" portion indicates that this users home directory should /home/johndoe. If you also want to restrict "johndoe" to his directory you should use the following command below instead:
useradd -s /bin/false -G psacln johndoe -d /home/johndoe
The "-G psacln" switch automatically add's the johndoe user to the psacln group, any user account's that are part of that group automatically get restricted to their home directory.
After adding the user you simply need to setup a password for them using the following command:
passwd johndoe
[edit] Qmail
qmail turn off reverse lookups.
-Rt0 flag the to the beginning of the server_args line in the /etc/xinet.d/smtp_psa
[edit] Install new Plesk license
download correct license from ftp.rackspace.com
/etc/init.d/psa stop mysql -u admin -p`cat /etc/psa/.psa.shadow` psa mysql> truncate key_history; mysql> truncate key_history_params; mysql> exit
rpm -e --nodeps psa-key-custom
rpm -Uvh plesk7.5_100_spamassassin (or correct license)
/etc/init.d/psa start
[edit] Qmail voodoo: (where spamblackhole is the domain or subject)
/var/qmail/bin/qmail-qread | grep -B1 spamblackhole |grep GMT | awk '{print $6}' | sed s/^#/-d/ > /home/rack/delete
[edit] Plesk FrontPage fixup: (from httpdocs dir)
disable frontpage in plesk
find . -name .htaccess -type f | xargs rm -rf find . -name '_vti*' -type d | xargs rm -rf find . -name '_private' -type d | xargs rm -rf
enable and reset password in plesk
[edit] Change TTLs in Plesk
update the misc table to the value:
update misc set val='86400' where param='SOA_TTL';
update the zone records:
mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' |
awk '{print /usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh
[edit] Plesk user passwords
select domains.name,domains.id,mail.mail_name,accounts.password from domains,mail,accounts where domains.id=mail.dom_id and accounts.id=mail.account_id and accounts.password='password';
[edit] Plesk FTP users
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT domains.name, sys_users.login, accounts.password FROM hosting, domains, sys_users, accounts WHERE hosting.dom_id = domains.id AND hosting.sys_user_id = sys_users.id AND sys_users.account_id = accounts.id ORDER BY domains.name;"
[edit] Upgrade to PHP5 on Plesk 8.1
rpm -e `rpm -qa | grep -i sitebuilder` rpm -e php-sqlite2 sb-publish rpm -e PPWSE rpm -e --nodeps php-domxml rpm -Uvh *.rpm up2date --configure
[edit] Plesk mail mchk
/usr/local/psa/admin/bin/mchk -v /usr/local/psa/admin/bin/mchk -v --with-spam
[edit] Kill Qmail queue
#!/bin/sh
# remove everything - STOP QMAIL FIRST!
/sbin/service qmail stop
for i in bounce info intd local mess remote todo;
do find /var/qmail/queue/$i -type f -exec rm {} \;
done
/sbin/service qmail start
[edit] Plesk5 websrvmng (sort of)
/usr/local/psa/admin/bin/my_apci_rst -v
[edit] Plesk UserDirs in 8+
Just create the file /etc/httpd/conf.d/userdir.conf and add in the following contents:
<VirtualHost the.primar.ip.address:80>
ServerName default
UseCanonicalName Off
DocumentRoot /var/www/vhosts/default/htdocs
UserDir httpdocs
ScriptAlias /cgi-bin/ "/var/www/vhosts/default/cgi-bin/"
<Directory "/var/www/vhosts/">
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
Options +Includes +ExecCGI
</Directory>
<Directory "/home/httpd/vhosts/">
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
Options +Includes +ExecCGI
</Directory>
</VirtualHost>
[edit] More fun with qmail
/var/qmail/bin/qmail-qread | grep "somethin@yourdomain.com" | awk '{print $6}' | sed 's/^/-d/g' |
sed 's/#//g' > /home/rack/rmspam.sh
then just:
qmHandle `cat rmspam.sh`
[edit] Plesk SPAM link
http://kb.swsoft.com/article_22_766_en.html
[edit] Add spell checking to Horde
You need to ADD the following line to
/usr/share/psa-horde/imp/config/conf.php
$conf['utils']['spellchecker'] = 'aspell';
[edit] Lower TTLs in Plesk
insert into misc values ('soa_TTL','300');
mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' |
awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh
