Cannot restart or reconfigure web server on Plesk: nginx: [emerg] open() "/etc/n

Started by Suhitha, Sep 04, 2025, 08:13 AM

Previous topic - Next topic

Suhitha

Question: 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)


Applicable to:

  • Plesk for Linux


Symptoms

  • Cannot restart nginx or reconfigure web server:

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


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