• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue Nginx Configuration error and broken web host

Randy Stott

New Pleskian
I recently upgraded to Onyx 17.0, and after machine restart, my websites are all broken.

I cannot restart nginx. This is the error I get when I try to start it from the Tools&Settings > Services page:

Unable to start service: Unable to manage service by nginxmng: ('start', 'nginx'). Error: [2017-05-26 18:39:24] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/nginx_control' '--start'] with exit code [1] Can not start proxy server: /usr/local/psa/admin/sbin/nginx-config execution failed: nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed

I have access to SSH and plesk control panel. E-mail and FTP are all working, but I am getting the Apache welcome page on all of my sites (www.geartechnology.com).

Additional errors from the Webserver Configurations Troubleshooter:
Error: Can not reconfigure web server configurations: Unable to execute httpdmng: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: [2017-05-26 18:51:27] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2017-05-26 18:51:27] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2017-05-26 18:51:27] ERR [panel] Apache config (14958390870.17421900) generation failed: Template_Exception: nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed


Error: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed.

Any help would be appreciated.
 
Last edited:
looks like your Phusion Passenger is corrupted or not installed correctly. If you don't need it, delete phusion-passenger.conf
 
Error messages are now gone, but Nginx still will not start from control panel. From SSH i get the message that nginx is disabled in config. Plus, none of the websites hosted on the server show anything but the apache test page. (Actually, requests to any of the domain home pages result in a 403 forbidden code, and the apache test page is just what shows up).
 
Hi Randy Stott,

From SSH i get the message that nginx is disabled in config.
To enable NGINX ( which is disabled by default ), you should consider to use the command ( logged in as user "root" over SSH ) :

Code:
/usr/local/psa/admin/bin/nginxmng -e

More options for the CLI - command "nginxmng" can be displayed with the command:
Code:
/usr/local/psa/admin/bin/nginxmng --help

or

/usr/local/psa/admin/bin/nginxmng -h
 
Back
Top