Archive | Plesk RSS feed for this section

Non-chrooted Cronjobs In Plesk 10

Plesk 10 has a bug (feature?) where it inserts this line into the crontab file for each user (including non-chrooted users): SHELL=/usr/local/psa/bin/chrootsh This effectively breaks the jobs, because it makes them try to run in a chroot jail, which won’t work. You can manually remove the lines but Plesk will restore them when the job [...]

Plesk 10 has a bug (feature?) where it inserts this line into the crontab file for each user (including non-chrooted users):

SHELL=/usr/local/psa/bin/chrootsh

This effectively breaks the jobs, because it makes them try to run in a chroot jail, which won’t work. You can manually remove the lines but Plesk will restore them when the job is edited. A workaround, is to run this command on the server:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

That changes the SHELL setting to a normal default value, which should run the jobs correctly. This is not a great fix, because it probably messes up cronjobs for users who really are chrooted but it may be useful to some.

–ben

View Comments Continue Reading →

Plesk Admin Password

On versions prior to Plesk 10, you can find the Plesk admin password in: /etc/psa/.psa.shadow For Plesk 10 and beyond, use this command instead: /usr/local/psa/bin/admin –show-password Even more interesting is the MySQL admin password. For all versions of Plesk, the MySQL admin password is the string contained in /etc/psa/.psa.shadow. In Plesk 10, the password is [...]

On versions prior to Plesk 10, you can find the Plesk admin password in:

/etc/psa/.psa.shadow

For Plesk 10 and beyond, use this command instead:

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

Even more interesting is the MySQL admin password. For all versions of Plesk, the MySQL admin password is the string contained in /etc/psa/.psa.shadow. In Plesk 10, the password is the hashed value stored in this file.

View Comments Continue Reading →

Easy Plesk Access Tricks

Plesk is a popular web hosting control panel used by many of our clients. On servers with Plesk, the control panel is located at: https://yourdomain.com:8443 There are several problems with this URL: 1. It’s hard for users to remember the 8443 on the end and the https on the beginning of the URL. 2. Plesk [...]

Plesk is a popular web hosting control panel used by many of our clients. On servers with Plesk, the control panel is located at:

https://yourdomain.com:8443

There are several problems with this URL:

1. It’s hard for users to remember the 8443 on the end and the https on the beginning of the URL.

2. Plesk by default uses a self signed SSL certificate that causes warning to be displayed in the user’s web browser.

Wouldn’t it be nice if you could put Plesk on a friendly URL like https://plesk.yourdomain.com?

Also lets have:

http://plesk.yourdomain.com

automatically redirect to:

https://plesk.yourdomain.com.

Now the your users don’t have to remember the https part either.

Now lets get really fancy. Suppose your customer has a domain named acme.com hosted on your server. It would be nice to have the URL:

http://acme.com/plesk

redirect to:

http://plesk.yourdomain.com.

Guess what – it can all be done! Here’s how:

1. Get an SSL certificate for plesk.yourdomain.com. A $29 cert from GoDaddy will work just fine. Place the SSL key in:

/etc/pki/tls/private/plesk.yourdomain.com.key

and the SSL certificate in:

/etc/pki/tls/certs/plesk.yourdomain.com.crt

2. Next, create /etc/httpd/conf.d/plesk_proxy.conf with the following contents:


Redirect permanent /plesk https://plesk.yourdomain.com

<VirtualHost *:80>
   ServerName plesk.yourdomain.com
   Redirect permanent / https://plesk.yourdomain.com
</VirtualHost>

<VirtualHost *:8444>
   ServerName plesk.yourdomain.com
   ErrorLog logs/plesk_proxy.error_log
   CustomLog logs/plesk_proxy.access_log common

   SSLEngine on
   SSLProtocol all -SSLv2
   SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
   SSLCertificateFile /etc/pki/tls/certs/plesk.yourdomain.com.crt
   SSLCertificateKeyFile /etc/pki/tls/private/plesk.yourdomain.com.key

   ProxyRequests Off
   <Proxy *>
      Order deny,allow
      Allow from all
   </Proxy>

   SSLProxyEngine On
   ProxyPass / https://127.0.0.1:8443/
   ProxyPassReverse / https://127.0.0.1:8443/
</VirtualHost>

Now just restart Apache and you’re ready to go.

Couple of issues to note:

  1. You’ll need to add the hostname plesk.yourdomain.com to DNS.
  2. Depending on your server config, you may need to place plesk.yourdomain.com on a dedicated IP address since each IP address can host only a single SSL site.
View Comments Continue Reading →