Plesk bootstraper failed to repair Webserver Configuration

Created:

2016-11-16 12:40:35 UTC

Modified:

2017-08-08 13:44:56 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk bootstraper failed to repair Webserver Configuration

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Websites are not working. Nginx is enabled.

An error is shown in Plesk:

New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

Attempt to execute

# /usr/local/psa/bootstrapper/pp12.5.30-bootstrapper/bootstrapper.sh repair

fails with the error:

Regenerating web servers' configuration files...
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
[2] => -service-node
[3] => local
)

Details: [2016-09-14 15:23:28] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2016-09-14 15:23:28] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2016-09-14 15:23:29] ERR [panel] Apache config (14738594080.02981900) generation failed: Template_Exception: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
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/nginx.conf" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed


Warning: web server configuration is broken. We will try to repair it. This operation can take a lot of time, please do not interrupt the process.
Unable to rebuild web server configuration, possible there are broken domains

Check Nginx configuration folder:

# ll /etc/nginx/ |grep '\\?'
ls: cannot access /etc/nginx/modules.conf.d: No such file or directory
ls: cannot access /etc/nginx/win-utf: No such file or directory
ls: cannot access /etc/nginx/mime.types: No such file or directory
ls: cannot access /etc/nginx/nginx.conf: No such file or directory
ls: cannot access /etc/nginx/mime.types.default: No such file or directory
ls: cannot access /etc/nginx/uwsgi_params.default: No such file or directory
ls: cannot access /etc/nginx/scgi_params.default: No such file or directory
ls: cannot access /etc/nginx/scgi_params: No such file or directory
ls: cannot access /etc/nginx/koi-utf: No such file or directory
ls: cannot access /etc/nginx/uwsgi_params: No such file or directory
ls: cannot access /etc/nginx/nginx.conf.default: No such file or directory
ls: cannot access /etc/nginx/koi-win: No such file or directory
?????????? ? ? ? ? ? koi-utf
?????????? ? ? ? ? ? koi-win
?????????? ? ? ? ? ? mime.types
?????????? ? ? ? ? ? mime.types.default
d????????? ? ? ? ? ? modules.conf.d/
?????????? ? ? ? ? ? nginx.conf
?????????? ? ? ? ? ? nginx.conf.default
?????????? ? ? ? ? ? scgi_params
?????????? ? ? ? ? ? scgi_params.default
?????????? ? ? ? ? ? uwsgi_params
?????????? ? ? ? ? ? uwsgi_params.default
?????????? ? ? ? ? ? win-utf

It is a virtual environment served by Virtuozzo. Check resolution from https://kb.plesk.com/en/122762 KB article to define the environment type.

Cause

Links are broken.

Resolution

Contact Virtuozzo support .

Workaround

Disable Nginx:

# plesk sbin nginxmng -d
Have more questions? Submit a request
Please sign in to leave a comment.