Category: Plesk

  • Plesk mail not working 10024: Connection refused

    On a Plesk mail server, when sending/reciving email, it fail with following error in /var/log/maillog

    Aug 11 19:49:28 vmi274961 postfix/smtp[29276]: E413C3320265: to=, relay=none, delay=0.47, delays=0.47/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    

    To fix, reinstall email-security extension.

    plesk bin extension --uninstall  email-security
    

    Verify mail works. If all good, you can reinstall the Plesk mail security extension from Plesk admin

    root@vmi274961:~# plesk bin extension --list
    advisor - Advisor
    baqend - Speed Kit
    composer - PHP Composer
    configurations-troubleshooter - Webserver Configurations Troubleshooter
    dgri - Imunify QuickPatch
    digitalocean-spaces-backup - DigitalOcean Spaces Backup
    diskspace-usage-viewer - Diskspace Usage Viewer
    dnssec - Plesk DNSSEC
    domain-connect - Domain Connect
    email-security - Plesk Email Security
    firewall - Firewall
    git - Git
    google-drive-backup - Google Drive Backup
    grafana - Grafana
    heavy-metal-skin - Skins and Color Schemes
    kernelcare-plesk - KernelCare
    letsencrypt - Let's Encrypt
    monitoring - Advanced Monitoring
    new-relic - New Relic - Application Performance Monitoring
    pagespeed-insights - Google PageSpeed Insights
    panel-migrator - Plesk Migrator
    plesk-mobile - Plesk Mobile Center
    repair-kit - Repair Kit
    revisium-antivirus - ImunifyAV
    site-import - Site Import
    social-login - Social Login
    sslit - SSL It!
    symantec - DigiCert SSL
    traffic-monitor - Domain Traffic Monitor
    watchdog - Watchdog
    wp-toolkit - WordPress Toolkit
    xovi - SEO Toolkit
    root@vmi274961:~# plesk bin extension --uninstall  email-security
    The extension was successfully removed.
    root@vmi274961:~# 
    

    If its mail configuration issue, you can run

    plesk repair mail
    

    Plesk Mail not working amavis error

    See Plesk

  • How to enable gzip on Plesk Nginx

    To enable gzip on Plesk server with Nginx proxy, go to

    Plesk > Domains
    

    Click on the domain for which you need gzip compression enbaled.

    Plesk Nginx

    click on “Apache & nginx Settings”. On next page, scroll down, add following to “Additional nginx directives” text box.

    gzip on;
    gzip_http_version  1.1;
    gzip_comp_level    5;
    gzip_min_length    256;
    gzip_proxied       any;
    gzip_vary          on;
    gzip_types
    application/atom+xml
    application/javascript
    application/x-javascript
    application/json
    application/rss+xml
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    application/xhtml+xml
    application/xml
    font/opentype
    image/svg+xml
    image/x-icon
    text/css
    text/plain
    text/x-component;
    

    Plesk Additional nginx directives

    To verify gzip is working, you can open a file directly in browser. Check response headers in browser develoer tool, you should see gzip.

    verify gzip in chrome developer tools

    See Plesk

  • CentOS 7 Plesk  server DNS not starting

    CentOS 7 Plesk server DNS not starting

    On a CentOS 7 Plesk server DNS failed to start. Plesk on CentOS 7 use named-chroot.service for starting DNS.

    I tried to start DNS with

    systemctl restart named-chroot
    

    On checking status, it shows DNS failed to start

    systemctl status named-chroot
    

    I removed Bind DNS server using command

    plesk installer
    

    Removed all bind related packages with yum. Removed all DNS configs from /etc and /var/named folder.

    Reinstalled Bind DNS and run plesk repair to fix DNS entry

    plesk repair dns
    

    But it did not resolve the problem. I checked named.conf with

    named-checkconf /etc/named.conf
    

    It showned error is related with

    acl common-allow-transfer {
            11.11.12.100/255.255.255.0;
            1637:4100:203:6664::/64;
    };
    

    Problem is fixed by removing the entry “11.11.12.100/255.255.255.0” from

    Plesk > Tools & Settings > DNS Zone Template > Transfer Restrictions Template
    

    You can use IP or CIDR here. But you don’t need this if you don’t have secondary DNS servers.

  • Plesk Change Backup Location

    Plesk Change Backup Location

    By default, Plesk store backups in folder /var/lib/psa/dumps/. To move this to a differnt partition or directory, create a folder

    mkdir /backup
    chown psaadm:psaadm /backup
    chmod 750 /backup
    

    Edit file

    vi /etc/psa/psa.conf
    

    Find

    DUMP_D /var/lib/psa/dumps
    

    Replace with

    DUMP_D /backup
    

    Move old backup to new location

    rsync -avzP /var/lib/psa/dumps/ /backup/
    

    Remove old backup directory, here i rename it to dumps-old, you can delete it.

    cd /var/lib/psa
    mv dumps dumps-old
    ln -s /backup dumps
    

    Restart Plesk

    service sw-cp-server restart
    

    Related Posts

    Plesk
    Plesk MySQL Daily Backup Script

  • Plesk move vhosts folder

    Plesk use /var/www/vhosts folder to store sites. On some servers this folder will be on smaller partition. Say you have all disk space on partition /home, in such cause, you can use following command to move web site files to /home folder with following command.

    plesk bin transvhosts.pl --dest-dir /home/ --correct-scripts
    

    /home/ = you can replace this any any folder you wish. Plesk will move the site files, update the configuration as required.

    NOTE: In this example, i used /var/www/vhosts instead of /home/ as the server was using non default folder for vhosts, i am moving all sites back to default location (/var/www/vhosts).

    See Plesk

  • Install PHP 5.6 on Debian 9 Plesk Server

    Install PHP 5.6 on Debian 9 Plesk Server

    To install PHP 5.6 on Debian 9 Plesk Server, add sury.org repository

    apt install apt-transport-https lsb-release ca-certificates -y
    wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
    echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
    

    Install PHP 5.6 with apt

    apt-get update
    apt-get install php5.6 php5.6-fpm php5.6-cgi php5.6-mysql php5.6-xsl php5.6-xml php5.6-tidy php5.6-recode php5.6-mcrypt php5.6-mbstring php5.6-intl php5.6-gd php5.6-curl php5.6-json php5.6-imagick php5.6-bcmath php5.6-readline php5.6-sqlite3
    

    Optional: Enable PHP 5.6 as default CLI

    update-alternatives --config php
    

    This will show all available PHP version, select the default version for command line.

    Enable PHP 5.6 in Plesk

    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/bin/php-cgi5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/cgi/etc/php.ini -type cgi -id "php56-cgi"
    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/bin/php-cgi5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/cgi/etc/php.ini -type fastcgi -id "php56-fastcgi"
    plesk bin php_handler --add -displayname "5.6 by sury.org" -path /usr/sbin/php-fpm5.6 -clipath /usr/bin/php5.6 -phpini /etc/php/5.6/fpm/etc/php.ini -type fpm -service php5.6-fpm -poold /etc/php/5.6/fpm/pool.d -id "php56-fpm"
    
  • Install MagicSpam on Plesk

    Install MagicSpam on Plesk

    MagicSpam is an anti spam filter for Plesk and DirectAdmin servers. You can purchase MagicSpam from

    https://www.magicspam.com

    To install MagicSpam, upload the zip file you get to /root/ folder of your server and run

    plesk bin extension --install /path/to/file.zip
    

    Example

    plesk bin extension --install /root/magicspam-plesk-2.0.18-1-Linux.zip
    

    Plesk MagicSpam

  • Install Redis on Plesk Debian Server

    Install Redis on Plesk Debian Server

    To install Redis on Plesk Debian/Ubuntu server, run

    apt install -y redis-server redis-tools
    

    Enable and restart redis-server

    systemctl enable redis-server
    systemctl restart redis-server
    

    Now install PHP Modules

    apt install -y plesk-php70-redis plesk-php71-redis plesk-php72-redis plesk-php73-redis plesk-php74-redis
    

    After installing, you will see redis listed in phpinfo() page.

    Redis PHP Debian

  • Find Plesk Version

    Find Plesk Version

    To find Plesk version, login to server as user root SSH and run

    plesk version
    

    Example

    root@root861:~# plesk version
    Product version: Plesk Onyx 17.9.8
         Build date: 2018/11/16 16:00
         OS version: Debian 9.6
           Revision: 6af2ef23569cac03e01272676158a016ed0eea1a
       Architecture: 64-bit
    Wrapper version: 1.2
    root@root861:~# 
    
  • List all installed extensions in Plesk

    To list all installed extensions in Plesk server, run

    plesk bin extension --list
    

  • Plesk Install PHP

    Plesk Install PHP

    To install differnt version of PHP in plesk server, run

    plesk installer --select-release-current --show-components
    

    This will list available PHP versions to install.

    To install PHP 5.3, run

    plesk installer --select-release-current --install-component php5.3
    

    To install PHP 5.6, run

    plesk installer --select-release-current --install-component php5.6
    

    See Plesk

  • Repair Plesk Server

    To repair the Plesk server, run

    plesk repair installation

    repair all

    plesk repair all -y

    To fix file system permissions for a website

    plesk repair fs example.com

    See Plesk