• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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