Articles in this section

Nginx failed to start on Plesk server: (99: Cannot assign requested address)

Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • All websites opened the Web Server's Default Page instead of content

  • It is not possible to access webmail of all websites and some websites, the attempt will fail with an 404 error:

    CONFIG_TEXT: The requested url /login.php was not found on this server

  • Unable to start/enable Nginx:

    CONFIG_TEXT: [emerg] 1618#0: bind() to 203.0.113.2:80 failed (99: Cannot assign requested address)

  • There are configuration files which contain the IP address from the error:

    # grep -ir '203.0.113.2' /etc/nginx/*
    /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf: listen 203.0.113.2:443 ssl;
    /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf: proxy_pass https://203.0.113.2:7081;
    /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf: listen 203.0.113.2:80;
    /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf: proxy_pass http://203.0.113.2:7080;

    # grep -r 203.0.113.2 /var/www/vhosts/system/*/conf/*.conf

  • Domain example.com doesn't exist on the server:

    # plesk repair web example.com
    Repairing web server configuration ..................................
    [ERROR] The domain example.com was not found.

Cause

Incorrect configuration files left after removing a domain.

Resolution

  1. Connect to the server via SSH

  2. Remove the file mentioned in the error, as an example: /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf

    # rm /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf

  3. Continue operations with the nginx service:

    If the service did not start:

    # service nginx restart

    If it was not possible to enable it:

    # plesk sbin nginxmng -e

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.