Nginx configuration test failed after server reboot

Created:

2017-03-15 10:15:29 UTC

Modified:

2017-08-08 13:13:10 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Nginx configuration test failed after server reboot

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Nginx service is unable to start after reboot. An error occurs while nginx is starting:

nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-0a0a0a") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-0a0a0a','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

Cause

SSL certificate changes are not applied to nginx configuration files after server reboot.

Resolution

1. Log in to the server via SSH.

2. Disable nginx service on the server:

# /usr/local/psa/admin/bin/nginxmng -d

3. Move all soft links from /etc/nginx/plesk.conf.d/vhosts to a temporary directory:

# mkdir /root/support_plesk && mv /etc/nginx/plesk.conf.d/vhosts/* /root/support_plesk

4. Reconfigure SSL certificates and Apache service:

# plesk bin repair --reconfigure-ssl-certificates
# /usr/local/psa/admin/bin/httpdmng --reconfigure-server

5. Enable nginx service and check its configuration:

# /usr/local/psa/admin/bin/nginxmng -e
# nginx -t 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Have more questions? Submit a request
Please sign in to leave a comment.