Articles in this section

Unable to repair web server configuration in Plesk: Can not reload proxy server

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • If an SSL certificate has been changed, it is not returned by a web server, and the old one is used instead.

  • New domains show Plesk Default Page, Plesk login page or fail to load with ERR_SSL_PROTOCOL_ERROR.

  • A cloned website shows 404 error.

  • Domains assigned to a newly added IP address do not load with:

    PLESK_INFO: ERR_CONNECTION_REFUSED

  • When repairing web-server configuration using Plesk repair tool, the operation fails with:

    # plesk repair web example.com -y
    Checking web server configuration. Please wait
    File not found: example.com.conf ...................................... [ERROR]
    Repairing web server configuration for the domain example.com
    ...
    [FAILED]
    ...
    Can not reload proxy server:

  • When checking nginx status manually, it is marked as disabled:

    # service nginx status
    ● nginx.service - Startup script for nginx service
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Drop-In: /lib/systemd/system/nginx.service.d
    └─respawn.conf
    Active: activating (auto-restart) (Result: exit-code) since Tue 2021-12-21 15:19:21 UTC; 1s ago
    Process: 8829 ExecStartPre=/bin/sh -c [ '${NGINX_ENABLED}' = 'yes' ] || { echo Not starting nginx as it is disabled
    Main PID: 4630 (code=exited, status=0/SUCCESS)

    or dead:

    # service nginx status
    nginx dead but pid file exists

    but nginx support is enabled in Plesk:

    # plesk sbin nginxmng -s
    Enabled

  • nginx error log is empty and is not filled with new records:

    # ls -l /var/log/nginx/error.log
    -rw-r--r-- 1 root root 0 Dec 21 14:59 /var/log/nginx/error.log

Cause

nginx configuration/installation is corrupted.

Resolution

  1. Connect to a Plesk server via SSH.

  2. Reenable nginx reverse proxy using these commands:

    # plesk sbin nginxmng --disable

    # plesk sbin nginxmng --enable

  3. Check nginx status:

    # service nginx status

     

    If the service is still down, reinstall nginx reverse proxy:

  1. Remove nginx reverse proxy:

    # plesk installer --select-release-current --remove-component nginx

  2. Install nginx reverse proxy using the following command:

    # plesk installer --select-release-current --install-component nginx

  3. Check nginx reverse proxy status:

    # plesk sbin nginxmng --status

    If it is "Disabled", enable the component:

    # plesk sbin nginxmng --enable

 

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.