Articles in this section

Cannot restart or reconfigure web server on Plesk: nginx: [emerg] open() "/etc/nginx/plesk.conf.d/vhosts/example.com.conf" failed (2: No such file or directory)

Plesk for Linux

Applicable to:

  • Plesk for Linux

Symptoms

  • Cannot restart nginx or reconfigure web server:

    CONFIG_TEXT: ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
    ERR [panel] Apache config (15432351070.94047600) generation failed: Template_Exception: nginx: [emerg] open() "/etc/nginx/plesk.conf.d/vhosts/example.com.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/zz010_psa_nginx.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] open() "/etc/nginx/plesk.conf.d/vhosts/example.com.conf" failed (2: No such file or directory) in /etc/nginx/conf.d/zz010_psa_nginx.conf:7
    nginx: configuration file /etc/nginx/nginx.conf test failed

  • example.com is not exist on the server
  • Note: the symptom below is optional

    Virtual hosts are mounted over NFS:

    # df -h /var/www/vhosts/
    Filesystem Size Used Avail Use% Mounted on
    203.0.113.2:/vol/plesk_node_data/ 48G 83M 48G 1% /data.

Cause

Nginx configuration leftovers.

Resolution

  1. Connect to the server via SSH

  2. Delete the leftovers:

    # rm /etc/nginx/plesk.conf.d/vhosts/example.com.conf
    # rm -rf /var/www/vhosts/system/example.com/
    # rm /etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf

  3. Reconfigure the webserver:

    # plesk repair web -y

Note for servers with NFS: NFS partitions are currently not supported by Plesk. Please vote for such implementation in our UserVoice portal

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.