Plesk: Difference between revisions

From Cheatsheet
Jump to navigation Jump to search
ini
No edit summary
Line 90: Line 90:




== upgrade php in plesk ==
=== upgrade php in plesk ===


All you have to do is the following.
All you have to do is the following.

Revision as of 19:49, 28 March 2011

Plesk


Location of the vhost in plesk

/var/www/vhosts/HoudiniESQ.com/conf

Turn off Safe_mode in plesk
NOTE-dont forget to replace <domain name>, with the actual domain name.
Create a “vhost.conf” file in “/var/www/vhosts/<domain name>/conf/”

cd /var/www/vhosts/<domain name>/conf/
vim vhost.conf

Insert the following into it.

<Directory /var/www/vhosts/<domain name>/httpdocs>
php_admin_value safe_mode off
php_admin_value open_basedir none
</Directory>

Now run the following to update the conf.

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<domain name>

Now restart httpd

service httpd reload

Dumping Databases in Plesk

mysqldump -u admin -p database > .sql


Email issues

If you ever find that emails are throwing this error on a plesk server while trying to be sent follow the steps below.

tail -f /usr/local/psa/var/log/maillog

I see this:

Nov 29 20:34:15 host X-Qmail-Scanner-2.08st:
[host.dokuga.com12910808557906501] clamdscan: corrupt or unknown clamd scanner
error or memory/resource/perms problem - exit status 512/2 
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906508] clamdscan:
corrupt or unknown clamd scanner error or memory/resource/perms problem - exit
status 512/2 
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st:
[host.dokuga.com12910808557906516] clamdscan: corrupt or unknown clamd scanner
error or memory/resource/perms problem - exit status 512/2 
Nov 29 20:34:15 host X-Qmail-Scanner-2.08st: [host.dokuga.com12910808557906523] clamdscan:
corrupt or unknown clamd scanner error or memory/resource/perms problem - exit
status 512/2

Then try to update clamd with the following.

freshclam

If that returns this error do the next part if not find another solution.

ClamAV update process started at Mon Nov 29 21:04:07 2010
main.cld is up to date (version: 53, sigs: 846214, f-level: 53, builder: sven)
WARNING: Current functionality level = 44, recommended = 53
Please check if ClamAV tools are linked against the proper version of libclamav
DON'T PANIC! Read http://www.clamav.net/support/faq
ERROR: chdir_tmp: Can't create directory ./clamav-ba29cb18cefd7655eebdcc82d2f7401d
WARNING: Incremental update failed, trying to download daily.cvd
ERROR: getfile: Can't create new file /var/clamav/clamav-08bf3637d601dae2695c04b7fc08d9ea in /var/clamav
Hint: The database directory must be writable for UID 111 or GID 105
WARNING: Can't download daily.cvd from db.us.clamav.net

now do this

cd /var
ll | grep clamav

if the results look like this:

drwxr-xr-x  2 qscand qscand  4096 Nov 29 04:34 clamav

You will need to do the following

chown -R qscand. clamav
chmod 777 clamav/
freshclam
/etc/init.d/clamd restart

Now you should have the following:

drwxrwxrwx  2 qscand qscand  4096 Nov 29 21:22 clamav

And this should solve the problem, as well as have all up to date virus stuff's.


upgrade php in plesk

All you have to do is the following.

wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh 
yum upgrade php
/etc/init.d/httpd restart
php -v

After you restart if the output gives you an error about ioncube just reinstall it.

yum search ioncube

now install whatever package it lists.

yum install php-ioncube-loader.x86_64
/etc/init.d/httpd restart
php -v

Now everything should work for you.