Linux Parallels Plesk 12.x – Useful tips and tricks

Published on Author gryzli

This is going to be Parallels Plesk 12.X related. I will share some experience with Linux Plesk problems, tips and tricks.

Plesk – Change the default shell for executing user cron jobs (schedule tasks)

By default, plesk is using a secured shell for executing user schedule tasks, which in my case is:

/usr/local/psa/bin/chrootsh

This could lead to some problems and cron jobs malfunctioning.

Enabling /bin/bash as as default user shell (server wide) could be done with the following command:

# /usr/local/psa/bin/server_pref –update -crontab-secure-shell /bin/bash

….

Plesk – Tunning default Apache mod_fcgid settings to fix php timeouts

If your error_log ( /var/www/vhosts/VHOSTl/logs/error_log ) ,  has some lines like these:

[Mon Dec 22 15:04:36 2014] [warn] [client xx.yy.xx.yy] mod_fcgid: read data timeout in 45 seconds
[Mon Dec 22 15:04:36 2014] [error] [client xx.yy.xx.yy] Premature end of script headers: index.php

OR these:

[Tue Dec 09 15:01:24 2014] [warn] [client xx.yy.xx.yy] mod_fcgid: can’t apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
[Tue Dec 09 15:01:36 2014] [warn] [client xx.yy.xx.yy] mod_fcgid: can’t apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
[Tue Dec 09 15:01:44 2014] [warn] [client xx.yy.xx.yy] mod_fcgid: can’t apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper

Then you probably need to tune a little bit your default mod_fcgid configuration, which resides here:

/etc/httpd/conf.d/fcgid.conf

Here is what I add:

FcgidIOTimeout 5000
FcgidBusyTimeout 5000

 

Plesk – Some internal configuration options

/etc/psa/psa.conf    - Some plesk related configurations

/etc/psa/.psa.shadow    – Shadow  password for my sq

 

Plesk – Check admin password

# /usr/local/psa/bin/admin –show-password

 

Plesk – Login with mysql root/admin user

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Plesk – Nginx – Configuring custom vhost config

Create custom template directory

# mkdir /usr/local/psa/admin/conf/templates/custom/domain

 

Copy the default template to the custom directory

# cp /usr/local/psa/admin/conf/templates/default/domain/nginxDomainVirtualHost.php /usr/local/psa/admin/conf/templates/custom/domain/

..

Now you can make some modifications on the custom “nginxDomainVirtualHost.php

 

Rebuild all vhosts config

# /usr/local/psa/admin/bin/httpdmng –reconfigure-all