I love Plesk – it’s a work of art that makes my life easier. Rather than a “programme” as such, it’s a web interface that takes control of several thousand services on a web server and makes administering domains and hosting a breeze.
Since 2012 I’ve been a certified Parallels Plesk Automation Technician.
Plesk uses ProFTP as the default FTP server. It has a handy feature that allows file uploads to resume or append should a connection be broken during transmission. This means that partially transferred data doesn’t have to be uploaded again, it can simply be added to – potentially saving a lot of time.
Although easy to activate, this feature is not enabled by default on Plesk installations for security reasons. Here’s how to make it happen:
Edit /etc/proftpd.conf and add the following few lines:
# allow resuming file uploads
You may find the AllowOverwrite directive in there already, in which case replace it with the above block. For the changes to take effect, restart the xinetd service (of which proFTP is part):
service xinetd restart
Works on both CentOS 6 and CentOS 7.
Note that for this to work, it also needs to be enabled in your FTP client. In FileZilla it’s under Settings – Transfers – File Exists Action:
You can update Plesk via the Web Interface (under Tools and Settings – Updates and Upgrades). However sometimes the interface times out, or browsers get confused – therefore it’s good to know that you can apply updates via the command line interface as well. In this article I’ll show you how (in Linux – I don’t know much about running Plesk on Windows I’m afraid).
We need to download the standard installer script for this. It’s a powerful little tool which can also be used to add or remove components from the current Plesk installation, or to install Plesk on a barebones server.
If you click the option “Download Plesk installer for Linux”, you’ll see the actual script open in a new browser tab. Not what we want, although you could copy and paste this into a new file on your Linux system. Instead, right-click on the link and choose “Copy Link” instead.
With that link in your clipboard, connect to your server via SSH and download the file with something like wget:
Thiswizard will guide you through the installation or upgrade process.Before
installing or upgrading Parallelsproducts,be sure to back up your data.
Tostart the installation or upgrade,pressNand then press Enter.
Toquit the installer,pressQand then press Enter.
Follow the instructions to upgrade Plesk. You can also call the script with several options, for a full list of those call it with “–help”. To see all available versions of Plesk during the installation, use “–all-versions”, which will eventually lead you to a screen similar to this:
I’ve recently migrated a WordPress site from one server to another (running Plesk) and noticed that file uploads were no longer working. All existing files showed up fine, but new uploads were always aborted with a message such as “Is your uploads directory writable?” – which of course it was.
Here’s what it looked like – a familiar sight for anyone with WordPress issues:
Uploads had been working fine on the pervious server, and other sites on the new server didn’t have a problem. Puzzles like that rob me of sleep and sweet dreams. I decided to poke into any error logs on the new server (which wasn’t even that new mind you).
To my surprise I found that in /var/www/vhosts/system/domain.com/logs, there was an error log that was seemingly growing out of control very quickly. At one point it was over 500GB in size. Obviously this had a very adverse effect on the that server, which was running out of space when it shouldn’t have.
File(/)is not within the allowed path(s):(/home/www/vhosts/domain.com/:/tmp/)
in/home/www/vhosts/domain.com/httpdocs/wp-includes/functions.php on line1501
Sure I thought, I can understand why the server had a problem with this: the path is just NOT where domain data is saved on my target server. Why was it addressing a path that may have worked on the source server? Shouldn’t WordPress adjust itself automatically?
Why yes, usually it does – unless of course there’s an old database entry that specifies this path. Many options have been removed from the WordPress admin interface over time, but the values that could be set are still in effect. Thankfully it was an easy fix – even though it took me days to think of this: that nasty path was defined under Settings – Media:
Anything in the top field is a full server path. If it starts with a slash it’s a root path, while no slash at the beginning is a relative path. A wrong path (like mine) messed up all future uploads. All I had to do was delete anything in that field.
Note that this option only shows up if a path is defined: as soon as I cleared the field, the option disappeared.
Thanks to cleasterwood for this tip, who had this problem 5 years ago (goes to show how old my WordPress installation really was):
As for that huge 500GB log file, that’s another story: simply deleting it was not enough to free up space on the server. Because Apache kept an open write connection to that file, I was still running low on space – even though the file was gone. Restarting Apache didn’t do the trick either.
What did work here was a full server restart. It took a little longer than usual, but the massive log file was gone, and over 500GB of space was back at my disposal. And more importantly, my WordPress instance was accepting uploads again.
By default Plesk on Linux uses Postfix for outgoing email, and by default listens on port 25 for outgoing SMTP mail. Some service providers do not allow to send emails on that port, and tragedy occurs: clients can’t send email with their Plesk servers. Not good.
Other SMTP ports will usually work, such as the other favourite 587 – but by default, Postfix is not listening on this port for email submissions – at least not in Plesk 12.0.8 on CentOS 7.
Here’s how to enable port 587 for such ventures:
Open the Postfix configuration file at /etc/postfix/master.cf and find the following line. It’s commented out. All we have to do is to remove the hash in front of it, and email can be sent via port 587:
Restart Postfix for the changes to take effect. In CentOS 5 and 6:
service postfix restart
This will also work in CentOS 7, but to be more precise:
systemctl restart postfix.service
Note that port 587 needs to be open in your firewall. If the Plesk Firewall Extension is enabled, it’ll take care of it for you automagically.
Some of my servers have a weird habit of throwing an Apache error after a restart: NGINX is running fine, but Apache can’t start and all websites are down. I have no idea why some servers do it and some do not. But when they do, it’s just plain annoying.
Here are two ways to fix this problem.
Restart Apache gracefully
The quickest option is to shutdown NGINX, restart Apache, tell it to shutdown gracefully and then bring up NGINX again. Here are the commands that will work on CentOS 7:
systemctl stop nginx.service
systemctl restart httpd.service
systemctl restart nginx.service
Likewise, on CentOS 6 we can use the service command to do the same:
service nginx stop
service httpd restart
service nginx restart
Note that Apache doesn’t always like a restart – in which case, stop the service first, give it a moment and then restart it. Quirks and habits I guess.
If you find yourself doing this a lot, consider writing a quick script with the above commands, or restart your server less often (sometimes it’s enough to restart Plesk, or not reboot the machine at all). Alternatively, you can remove NGINX altogether and avoid such problems in the future.
Removing NGINX from Plesk
NGINX is not necessary – Apache will do a good job by itself. If you want to get rid of it completely, head over to Tools and Settings (or the Server Tab if you’re in Power User Mode) and select Updates and Upgrades. You’ll be taken to the Parallels Installer. Select Add/Remove Components.
Scroll down to the NGINX section under Web Hosting Features and untick both NGINX options. Now click Continue at the bottom and NGINX will be removed, leaving Apache in charge for all website connections. There’s no need to restart Plesk.
Why would anyone want to use both NGINX and Apache together?
Very good question indeed. Both are excellent web servers, and logic dictates that you should use one or the other. Using two web servers together is a certain sign of trouble.
From what I understand, NGINX is not designed to be a replacement web server in Plesk (even though NGINX can be used in this way on a LAMP Stack). Instead it is implemented as an enhancement to Apache, sitting in front of it. Static files are therefore served from NGINX via Apache, and NGINX acts as a reverse proxy server.
The benefits are faster connections and a smaller memory footprint. Read more about how NGINX and Apache are implemented in Plesk in the following articles:
In this episode I’ll show you how to setup Plesk Mail in Thunderbird for Windows. Unlike most email clients, Thunderbird can figure out the correct settings by itself – something neither Outlook nor Mac Mail can do. Therefore, the real magic with Thunderbird is figuring out how to get to the account settings.
To do so, click the three little lines next to the search box. It will bring up a fly-out menu. Under Options – Account Settings, setup a new account or change the settings for an existing one.
Thunderbird is clever usually enough to detect the settings it needs to connect to the Plesk server. In case it fails, use the following:
In this episode I’ll show you how to setup Plesk Mail in Microsoft Outlook on Windows. It’s often a big stumbling block for users. The instructions will also work for Microsoft Essentials, the predecessor of Outlook Express. I’m using Outlook 2010 here, but the instructions are also applicable to later versions.
The two important windows are under Account Settings, there’s a window with six tabs. One of which is labelled Outgoing Server and the other one is called Advanced:
Make sure Outlook is set to use TLS for both incoming and outgoing connections. The Root Folder Path needs to be set to INBOX (in all capitals).
The default directory for all web files in Plesk on Linux is /var/www/vhosts. Usually this works well, but if you’d like to use another partition instead, you’ll be pleased to hear that you can!
Parallels (or Odin as we call them now) have written a handy script which moves the content and patches the relevant configuration file and copies all content at the same time. The script is called transvhosts and you can download it here:
This may take a moment or two depending on the amount of content you have in the current directory. The script will patch Plesk’s configuration file and restart the panel. There’s minimal downtime in involved in this process.