Articles in this section

Plesk and/or websites are down after removing /var/log/ directory

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • The /var/log/ directory was cleaned up or removed.

  • All websites show the following message in the browser:

    CONFIG_TEXT: Site can't be reached

  • Plesk shows the next error:

    CONFIG_TEXT: ERR_CONNECTION_REFUSED

  • Plesk services are down:

    # service sw-engine status
    sw-engine-fpm is stopped

    # service sw-cp-server status
    sw-cp-serverd is stopped

  • Apache service is down and cannot be started with the following error

    # service httpd start

    Starting httpd: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.
    Unable to open logs

    [FAILED]

  • Some folders are missing in the /var/log/ folder:

    # ls -la /var/log/nginx
    ls: cannot access /var/log/nginx: No such file or directory

    # ls -la /var/log/sw-cp-server
    ls: cannot access /var/log/sw-cp-server: No such file or directory

    # ls -la /var/log/httpd
    ls: cannot access /var/log/httpd: No such file or directory

Cause

Missing log directories prevent services to start correctly.

Resolution

  1. Connect to the server via SSH.

  2. Try to start the corresponding services:

    # service httpd start
    # service sw-cp-server start
    # service sw-engine start
    # service nginx start

  3. Depend on which service is failed to start, create the corresponding missing folder in the /var/log/ directory manually:

    # mkdir -p /var/log/httpd
    # mkdir -p /var/log/sw-cp-server
    # mkdir -p /var/log/nginx
    # mkdir -p /var/log/plesk-php73-fpm
    # mkdir -p /var/log/plesk-php71-fpm

  4. Start the corresponding services one more time:

    # service httpd start
    # service sw-cp-server start
    # service sw-engine start
    # service nginx start

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.