Access logs are not rotated on Plesk server: Rotation of files with multiple hard links is not allowed



This Plesk Obisidian issue was initially handled by Plesk Support, but the solution wasn’t ideal, as it applied changes to all configuration files, including those that didn’t require it. This resulted in duplicated options being added to the files.

Symptoms

  • Log rotation doesn’t rotate logs, resulting in no compressed .gz files being created.
  • Forcing log rotation for a specific domain results in the following error:
/usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.d/example.com
(...)
considering log /var/www/vhosts/system/example.com/logs/access_log.processed log 
/var/www/vhosts/system/example.com/logs/access_log.processed has multiple (2) hard links. 
Rotation of files with multiple hard links is not allowed for 
/var/www/vhosts/system/example.com/logs/*.processed -- skipping.
(...)

Cause

This issue is due to product bugs, resolved in the following updates:

  • #PPPM-13562: “Fixed the issue where log rotation failed for files with two or more hard links.”
    Fixed in: Plesk Obsidian 18.0.60 (02 April 2024)
  • #PPPM-13473: “Log rotation now works correctly after updating to Plesk Obsidian 18.0.42.”
    Fixed in: Plesk Obsidian 18.0.43 (12 April 2022)
  • #PPPM-13519: “Log rotation now works correctly after updating to Plesk Obsidian 18.0.43 even if /usr/local/psa/etc/logrotate.conf was customized.”
    Fixed in: Plesk Obsidian 18.0.44 (24 May 2022)

Resolution

It is recommended to update your server to the latest Plesk version. For guidance, see: How to install Plesk updates.

Workaround

If updating is not possible, you can try adding the allowhardlink directive in the log rotation configuration files as a workaround.

If updating is not an option, you can manually add the allowhardlink directive to log rotation configuration files as a workaround. Follow these steps:

Before making any changes, it’s recommended to back up the existing configuration files. Run the following command:

cp -r /usr/local/psa/etc/logrotate.d/ /usr/local/psa/etc/logrotate.d_backup/

2. Create and Run a Script to Add the Directive

You can create a script that checks if the allowhardlink directive is missing in each log configuration file, and add it only if necessary.

    1. Open your terminal and create the script:
nano /root/add_allowhardlink.sh
    1. Paste the following script into the file:

#!/bin/bash

# Directory containing the logrotate configuration files
LOGROTATE_DIR="/usr/local/psa/etc/logrotate.d/"

# Loop through each configuration file in the directory
for config_file in "$LOGROTATE_DIR"/*; do
  # Check if the file contains "allowhardlink"
  if ! grep -q "allowhardlink" "$config_file"; then
    # If not, append "allowhardlink" after "copytruncate"
    sed -i '/copytruncate/a allowhardlink' "$config_file"
    echo "Added 'allowhardlink' to $config_file"
  else
    echo "'allowhardlink' already exists in $config_file"
  fi
done
  
    1. Save and exit the file by pressing CTRL + X, then Y, and Enter.
    2. Make the script executable by running:
chmod +x /root/add_allowhardlink.sh
    1. Run the script to apply the changes:
/root/add_allowhardlink.sh

3. Verify the Changes

Once the script has run, you can manually check some configuration files to ensure the allowhardlink directive has been correctly added. Run the following command to check a specific file:

cat /usr/local/psa/etc/logrotate.d/your-config-file

This solution ensures that the allowhardlink directive is only added to files where it’s missing, preventing duplicate entries.

Mail Autodiscover Feature in Plesk Obsidian for Linux

The Mail Autodiscover feature in Plesk Obsidian for Linux is designed to simplify the process of configuring mail clients, such as Outlook, Thunderbird, and mobile devices. It automatically detects and configures the email server settings (IMAP, POP, SMTP) for a domain’s mail accounts, reducing manual input.

Key Points about the Mail Autodiscover Feature

1. Purpose of Autodiscover

The autodiscover feature helps end-users by automatically setting up their mail clients without the need to manually enter server settings (such as the IMAP/POP and SMTP server names, ports, and security settings). It simplifies email account configuration by automatically supplying the correct mail server details based on the user’s email address.

2. How Autodiscover Works

When a user adds their email account to a mail client, the client sends an Autodiscover request (usually to autodiscover.domain.com or domain.com/autodiscover/autodiscover.xml) to fetch the server configuration. The mail client receives the necessary settings, such as:

  • Incoming mail server (IMAP or POP).
  • Outgoing mail server (SMTP).
  • Port numbers and security settings (SSL/TLS).
  • Username and other optional settings.

3. Autodiscover for Domains in Plesk

In Plesk, Autodiscover is enabled by default for email services and can be managed per domain. Plesk creates DNS records for autodiscover.yourdomain.com and related services during domain setup to enable mail autodiscovery.

4. Protocols Supported by Plesk Autodiscover

IMAP, POP3, and SMTP server settings are supplied by the Autodiscover feature. It also supports SSL/TLS settings for secure mail communication.

5. DNS and SRV Records for Autodiscover

To ensure that Autodiscover works properly, Plesk creates DNS SRV records for the domain’s mail service. These records point mail clients to the correct servers for IMAP/POP and SMTP. The typical DNS SRV records created for Autodiscover are:

  • _autodiscover._tcp.yourdomain.com
  • _imaps._tcp.yourdomain.com
  • _pop3s._tcp.yourdomain.com
  • _smtps._tcp.yourdomain.com

6. Supported Mail Clients

Autodiscover works with various popular mail clients that support this feature, such as:

  • Microsoft Outlook (for automatic email account setup).
  • Mozilla Thunderbird.
  • Apple Mail.
  • Mobile devices like Android and iOS.

7. SSL/TLS and Autodiscover

Plesk ensures that mail autodiscovery can work over secure connections. When properly configured, clients will receive SSL/TLS settings, ensuring that the email communication is encrypted.

8. Customising Autodiscover

If you need to adjust or customise the Autodiscover behavior in Plesk (for instance, for a different domain setup or custom mail server), you can modify the DNS SRV records or Autodiscover configuration.

9. Troubleshooting Autodiscover

If Autodiscover is not working correctly:

  • Verify that the correct DNS SRV records are in place.
  • Ensure that your mail server’s SSL certificates are correctly configured.
  • Check your firewall settings to make sure the mail ports (IMAP/POP and SMTP) are open.
  • Test using the Microsoft Remote Connectivity Analyser to see if Autodiscover is working for your domain.

10. Enabling/Disabling Autodiscover

In some cases, you may want to disable Autodiscover for specific domains. You can do this by removing or adjusting the DNS records in the Plesk DNS settings.

Example of an Autodiscover SRV Record in Plesk

Here is an example of how an SRV record for autodiscovery might look in Plesk:

ServiceProtocolPriorityWeightPortTarget
_autodiscover_tcp00443autodiscover.yourdomain.com
_imaps_tcp00993mail.yourdomain.com
_smtps_tcp00465mail.yourdomain.com

How to Enable/Manage Autodiscover in Plesk

1. DNS Setup

Go to Domains > DNS Settings and ensure that the correct SRV and A records for Autodiscover are present.

2. Mail Server Settings

Ensure your mail server (Postfix/Dovecot) is correctly configured to support Autodiscover. You can check mail server settings in Tools & Settings > Mail Server Settings.

3. SSL Configuration

Ensure that SSL certificates for the mail server and Autodiscover domain are valid and properly set up.

Conclusion

The Mail Autodiscover feature in Plesk Obsidian for Linux simplifies the setup of email accounts by automatically detecting mail server settings and configuring mail clients accordingly. It works with popular clients like Outlook and Thunderbird and relies on DNS SRV records and proper mail server configurations. To ensure it works, ensure correct DNS, mail server, and SSL setups.

SiteJet Website Builder

Build, design, manage, and grow competitive websites, no coding required!

Sitejet Builder is included in all UKC Shared Hosting plans and lets you create competitive websites quickly and effortlessly directly from your panel. It has all the tools you need for easy site building, no coding required.

  • Drag & drop on-page editor
  • Powerful design capabilities
  • AI-driven content creation
  • Integrated eCommerce solution
  • Included with UKC Web Hosting
  • Fully integrated in your panel

Design beautiful websites

Easily create professional websites without coding or hiring a designer. Pick a template, customise it with our drag & drop editor, and hit ‘publish’ to go live.

Design websites with
  • 140+ Designer-made templates
  • Full design flexibility
  • Corporate Identity Detection
  • Global design settings
Plesk SiteJet Builder

Offer great user experience

Create fast, responsive, and SEO-friendly websites that users and search engines adore. Launch websites built for top rankings and focused on conversions in no time.

  • Created timely and hassle-free
  • Competitive with integrated eCommerce solution
  • SEO-friendly for better rankings
  • Responsive and fast for great UX
  • Customizable with widgets
  • Multi-language for international success

Create content effortlessly

Writing compelling content is not your strong suit? Don’t worry, Sitejet Builder has got you covered. Create and embed AI-powered content directly into your site.

  • AI-driven Text Generator
  • Dynamic content collections
  • Free stock photos & videos

Free & fully integrated

Enjoy powerful site-building capabilities at no additional cost to your UKC Hosting service plan. Expand your business to new markets and build your own website.

  • Fully integrated into the Plesk panel
  • More value, same price
  • Stay competitive
Plesk SiteJet Extension

Start building websites directly in your Plesk panel Now

SiteJet SiteBuilder is included in all UKC Shared Hosting Plans at no additional cost!

Frequently Asked Questions (FAQ)

1. What is Sitejet Builder for Plesk, and how do I access it?

  • Sitejet Builder for Plesk is a fully integrated, easy-to-use website builder available directly in your UKC Plesk panel. You can access it by logging into your Plesk control panel and selecting Sitejet Builder.

2. Do I need coding skills to use Sitejet Builder?

  • No, you don’t need any coding skills. Sitejet Builder is designed for easy use with a drag & drop editor, making website building simple and intuitive.

3. Is Sitejet Builder included in all UKC hosting plans?

  • Yes, Sitejet Builder is included for free in all our shared hosting plans.

4. Can I create an eCommerce website with Sitejet Builder?

  • Absolutely! Sitejet Builder comes with an integrated eCommerce solution, allowing you to create competitive online stores effortlessly.

5. Are there templates available in Sitejet Builder?

  • Yes, there are over 140 designer-made templates with full design flexibility, making it easy to create professional websites without hiring a designer.

6. How does Sitejet Builder ensure my website is SEO-friendly?

  • Sitejet Builder creates fast, responsive, and SEO-friendly websites. It focuses on top rankings and conversions, ensuring your site is optimised for search engines and user experience.

7. Can I create content for my website if I’m not good at writing?

  • Yes, Sitejet Builder includes an AI-driven Text Generator and dynamic content collections, making it easy to create compelling content without being a skilled writer.

8. What kind of support does UKC offer for Sitejet Builder?

  • UKC provides full support for Sitejet Builder. Our team can assist with any questions or issues you may have, ensuring you make the most out of this powerful tool.

9. Is Sitejet Builder suitable for creating multi-language websites?

  • Yes, Sitejet Builder supports multi-language capabilities, allowing you to cater to a global audience and achieve international success.

10. How do I install Sitejet Builder on my Plesk panel?

  • Sitejet Builder is already available in your UKC Shared Hosting plan, simply login to your Plesk Panel to access the online builder.

Website Migration Service: Transfer Your Site and Email from Another Host

UK-Cheapest.co.uk proudly offers a specialised website migration service, ensuring a hassle-free transfer of your site from servers like cPanel to Plesk. Our skilled team is dedicated to executing this process with precision, minimising downtime, and preserving the integrity of your data.

The cost of our website migration service varies depending on the complexity and specific requirements of your site.

For straightforward, single database or static websites, we are pleased to offer this service at a low cost, ensuring a seamless transition with little financial burden.

However, for sites that are more intricate or for projects involving multiple websites, the process becomes more complex and requires a custom approach. In such cases, we provide a tailored quotation to reflect the additional resources and expertise needed.

Our goal is to deliver a top-tier migration service that aligns with the unique demands of each website, ensuring a smooth and efficient transition at a fair and transparent price.

With a focus on thoroughness and clear communication, we handle every aspect of the migration, from initial backups to post-transfer testing, ensuring a smooth transition for your online presence.

Trust UKC to deliver a seamless migration experience, reflecting our commitment to excellence and customer satisfaction.

Frequently Asked Questions (FAQ)

1. How long does the website migration process take?

  • The duration of migration varies depending on the size and complexity of your website. Typically, it can take anywhere from a few hours to a couple of days. We aim to minimise downtime and will provide you with a more accurate timeline once we assess your specific needs.

2. Will my website be offline during migration?

  • We strive to minimise downtime as much as possible. In most cases, your website will remain online during the migration process. Any necessary downtime will be brief and planned during off-peak hours to reduce impact.

3. Is my data safe during the migration process?

  • Absolutely. Data security is our top priority. We do not make any changes to the source data. The migration process makes a copy of your original data onto the target server.

4. Will my website’s performance be affected after migration?

  • Your website’s performance should not be negatively affected. In fact, many clients experience improved performance and loading speeds post-migration due to our optimised server configurations.

5. What do I need to provide for the migration process?

  • We will need access to your current hosting account and any relevant credentials. This includes FTP/SFTP details, database information, and your domain registrar if a DNS update is required. We handle all the technical aspects and keep you updated throughout the process.

Fair Use Policy for Unlimited Storage on Our Shared Hosting Packages

At UKC, we take pride in offering unlimited resources as part of a selection of our hosting plans. However, it’s important to understand that “unlimited” resources must be governed by a fair use policy to ensure optimal service quality for all our clients. This policy outlines the responsible usage of our hosting resources, ensuring that every client gets the best possible hosting experience.

1. Purpose of Web Storage:

  • The unlimited hosting space provided is intended solely for the active files necessary for the running of your website. This includes your website’s code, databases, and media files essential for its operation.

2. Prohibited Uses of Web Storage:

  • The hosting space should not be used as a digital archive or for storing backups, large media files not used by your website, or any other files unrelated to the regular functioning of your website. Our goal is to maintain high-performance levels for all users, and using the space for unintended purposes could impair this goal.

3. One Account, One Entity:

  • To maintain the integrity of our hosting environment, each hosting account must only host websites belonging to a single entity. This policy is in place to prevent web agencies or developers from hosting multiple clients’ websites under one account. Each client or entity should have their own dedicated hosting account.

4. Monitoring and Enforcement:

  • We regularly monitor the usage of our hosting services to ensure compliance with this fair use policy. If we find that an account is not adhering to these guidelines, we will reach out to discuss appropriate solutions, which may include upgrading to a more suitable hosting plan or removing non-compliant files.

5. Adaptive Storage Allocation:

  • To enhance the security and efficiency of our hosting services, UKC implements an adaptive storage allocation strategy for our unlimited storage plans. Storage space is allocated in manageable chunks or blocks, and additional storage is provided as and when needed. This proactive approach serves a dual purpose: firstly, it safeguards against potential Distributed Denial of Service (DDoS) attacks, where excessive demands on storage could compromise server stability. Secondly, it prevents a malfunctioning or compromised website from consuming excessive resources, thereby ensuring that all clients on the server are protected from the cascading effects of such incidents. This method of allocation is part of our commitment to maintaining a secure, reliable, and high-performing hosting environment for all our clients.

6. Our Commitment to Quality Hosting:

  • This policy is designed to safeguard the quality and reliability of our hosting services for all clients. By ensuring that our resources are used appropriately, we can continue offering high-quality, unlimited hosting that genuinely meets your website’s needs.

We appreciate your understanding and cooperation in adhering to this fair use policy. It is our commitment to provide you with exceptional hosting services, and adhering to these guidelines helps us achieve this goal for all our clients.