Error on Apache files creation: a duplicate default server for XX.XX.XX.XX

Created:

2016-11-16 12:54:38 UTC

Modified:

2017-08-08 13:09:18 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error on Apache files creation: a duplicate default server for XX.XX.XX.XX

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  1. An error occurs during rebuilding of webserver files for a domain example.com :

    # /usr/local/psa/admin/bin/httpdmng --reconfigure-domain example.com
    [2016-08-23 04:22:51] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
    [2016-08-23 04:22:52] ERR [panel] Apache config (14719261700.95140800) generation failed: Template_Exception: nginx: [emerg] a duplicate default server for 10.20.30.40:443 in /etc/nginx/plesk.conf.d/ip_default/example.com.conf:7
    nginx: configuration file /etc/nginx/nginx.conf test failed

    file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
    line: 75
    code: 0
    nginx: [emerg] a duplicate default server for 10.20.30.40:443 in /etc/nginx/plesk.conf.d/ip_default/example.com.conf:7
    nginx: configuration file /etc/nginx/nginx.conf test failed
  2. Subscription example.com is assigned to dedicated IP address and example.com domain is set as default site for that IP in Home > Tools&Settings > IP Addresses > 10.20.30.40

Cause

Customization of /etc/nginx/nginx.conf configuration file.

Resolution

  1. Create a backup of an original file and restore one from package defaults:

    # cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf_old
    # cp /etc/nginx/nginx.conf.dpkg-dist /etc/nginx/nginx.conf
  2. Rebuild server configuration:

    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-server
Have more questions? Submit a request
Please sign in to leave a comment.