• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue nginx passenger config error

UnS3eN

Basic Pleskian
Hi guys,

Wondering if anyone could point me in the right direction.

I'm getting the following error on my Plesk panel ever since Obsidian upgrade (CentOS 6.10):
Code:
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.

The file /etc/nginx/conf.d/phusion-passenger.conf is pointing to doesn't exist:
Code:
#cat /etc/nginx/conf.d/phusion-passenger.conf
passenger_root /usr/share/passenger/phusion_passenger/locations.ini;

Code:
# la /usr/share/passenger
total 60K
1057009 drwxr-xr-x    9 root root 4.0K Aug 27 10:59 .
10878978 drwxr-xr-x. 175 root root 4.0K Apr 21 17:25 ..
1180306 drwxr-xr-x    3 root root 4.0K Aug 27 10:59 helper-scripts
1052840 drwxr-xr-x    3 root root 4.0K Jul  3 03:43 include
1050941 -rw-r--r--    1 root root 3.5K Sep 18  2019 mime.types
1052867 drwxr-xr-x    5 root root 4.0K Jul  3 03:43 ngx_http_passenger_module
1182169 drwxr-xr-x    4 root root 4.0K Sep 18  2019 node
1049162 -rw-r--r--    1 root root    0 Sep 18  2019 release.txt
1052910 drwxr-xr-x    2 root root 4.0K Jul  3 03:43 ruby_extension_source
1193080 drwxr-xr-x    2 root root 4.0K Aug 27 10:59 standalone_default_root
1193082 drwxr-xr-x    8 root root 4.0K Sep 18  2019 templates
1050942 -rw-r--r--    1 root root 3.2K Sep 18  2019 union_station_gateway.crt
1050943 -rw-r--r--    1 root root 4.0K Sep 18  2019 update_check_client_cert.p12
1050948 -rw-r--r--    1 root root 5.4K Sep 18  2019 update_check_client_cert.pem
1050950 -rw-r--r--    1 root root  800 Sep 18  2019 update_check_server_pubkey.pem

Guessing something didn't go entirely right during the update. I'd like to fix this instead of sweeping it under the rug by removing the .conf file. Just not sure how. I can't find what the .ini contents should be.

Just in case:
Code:
# plesk installer --select-product-id plesk --select-release-current --show-components --show-options
...
Detecting installed product components.
  panel             [up2date] - Plesk
  bind              [up2date] - BIND DNS server
  postgresql        [install] - PostgreSQL server
  fail2ban          [up2date] - Fail2Ban
  selinux           [up2date] - SELinux policy
  l10n              [up2date] - All language localization for Plesk
  git               [up2date] - Git
  pmm               [up2date] - Plesk Migrator
  sitebuilder       [install] - Web Presence Builder
  mysqlgroup        [up2date] - MySQL server
  horde             [up2date] - Horde
  roundcube         [install] - Roundcube
  kav               [install] - Kaspersky Anti-Virus
  drweb             [install] - Plesk Premium Antivirus
  spamassassin      [install] - SpamAssassin
  mailman           [install] - Mailman
  postfix           [up2date] - Postfix
  qmail             [install] - Qmail
  msmtp             [install] - MSMTP (relay only)
  dovecot           [up2date] - Dovecot
  courier           [install] - Courier
  proftpd           [up2date] - ProFTPD
  webalizer         [up2date] - Webalizer
  awstats           [up2date] - AWStats
  modsecurity       [up2date] - ModSecurity
  passenger         [up2date] - Phusion Passenger server
  ruby              [up2date] - Ruby support
  nodejs            [up2date] - NodeJS support
  gems-pre          [install] - Tools required for building Ruby gems
  mod_fcgid         [up2date] - mod_fcgid
  mod_perl          [install] - mod_perl
  mod-bw            [up2date] - mod_bw
  mod_python        [install] - mod_python
  webservers        [up2date] - Apache
  php7.3            [up2date] - PHP 7.3
  php7.2            [up2date] - PHP 7.2
  php7.1            [up2date] - PHP 7.1
  php7.0            [up2date] - PHP 7.0
  php5.6            [up2date] - PHP 5.6
  php5.5            [up2date] - PHP 5.5
  php5.4            [up2date] - PHP 5.4
  php5.3            [install] - PHP 5.3
  php5.2            [install] - PHP 5.2
  phpgroup          [up2date] - PHP 5 from OS vendor
  nginx             [up2date] - Nginx web server
  phpfpm            [up2date] - PHP-FPM from OS vendor
  config-troubleshooter[up2date] - Plesk Web Server Configuration Troubleshooter
  psa-firewall      [up2date] - Plesk Firewall
  watchdog          [up2date] - Watchdog system monitoring
  heavy-metal-skin  [up2date] - Skins and Color Schemes
  wp-toolkit        [up2date] - WordPress Toolkit
  advisor           [up2date] - Advisor
  letsencrypt       [up2date] - Let's Encrypt
  social-login      [install] - Social Login
  domain-connect    [install] - Domain Connect
  xovi              [install] - SEO Toolkit
  imunifyav         [install] - ImunifyAV
  sslit             [up2date] - SSL It!
  repair-kit        [up2date] - Repair Kit
  composer          [up2date] - PHP Composer
  monitoring        [up2date] - Advanced Monitoring

Code:
# nginx -V
nginx version: nginx/1.18.0
built with OpenSSL 1.1.1g  21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/share --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --modules-path=/usr/share/nginx/modules --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --user=nginx --group=nginx --with-file-aio --with-compat --with-http_ssl_module --with-http_realip_module --with-http_sub_module --with-http_dav_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_v2_module --add-dynamic-module=mod_passenger/src/nginx_module --add-dynamic-module=mod_pagespeed --with-openssl=lib_openssl --with-openssl-opt='zlib no-idea no-mdc2 no-rc5 no-ssl2 no-shared -fpic'
 
Last edited:
This file is a part of passenger package:

# rpm -qf /usr/share/passenger/phusion_passenger/locations.ini
passenger-6.0.2-2.centos.7+p18.0.30.0+t200826.0942.x86_64

Content of this file is:

# cat /usr/share/passenger/phusion_passenger/locations.ini
[locations]
packaging_method=rpm
bin_dir=/usr/bin
support_binaries_dir=/usr/lib64/passenger/support-binaries
lib_dir=/usr/lib64/passenger
helper_scripts_dir=/usr/share/passenger/helper-scripts
resources_dir=/usr/share/passenger
include_dir=/usr/share/passenger/include
doc_dir=/usr/share/doc/passenger-6.0.2/passenger
ruby_libdir=/usr/share/passenger
node_libdir=/usr/share/passenger/node
apache2_module_path=/usr/lib64/httpd/modules/mod_passenger.so
ruby_extension_source_dir=/usr/share/passenger/ruby_extension_source
nginx_module_source_dir=/usr/share/passenger/ngx_http_passenger_module

I'd suggest you try to reinstall passenger package.
 
I'd suggest you try to reinstall passenger package.
Tried that multiple times.
Code:
#yum reinstall passenger -y
.........

Reinstall     1 Package(s)

Total download size: 2.4 M
Installed size: 7.8 M
Downloading Packages:
passenger-6.0.4-1.el6.x86_64.rpm                                                                                                                                                                             | 2.4 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : passenger-6.0.4-1.el6.x86_64                                                                                                                                                                                     1/1
  Verifying  : passenger-6.0.4-1.el6.x86_64                                                                                                                                                                                     1/1

Installed:
  passenger.x86_64 0:6.0.4-1.el6

Complete!
# rpm -qf /usr/share/passenger/phusion_passenger/locations.ini
error: file /usr/share/passenger/phusion_passenger/locations.ini: No such file or directory

I'll try to just create the .ini and see what happens. Guessing there's more than just that .ini missing.
 
Reinstalled passenger from Plesk repo, the .ini file is now there.

plesk.png

Code:
# rpm -qf /usr/share/passenger/phusion_passenger/locations.ini
passenger-6.0.2-2.centos.7+p18.0.30.0+t200826.0942.x86_64

Still getting the error:
Code:
# nginx -t
nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
Code:
# cat /etc/nginx/conf.d/phusion-passenger.conf
passenger_root /usr/share/passenger/phusion_passenger/locations.ini;

# Avoid downloading of sources or binary for ruby passenger_native_support.so
# after each nginx restart by default because of development packages
# or libruby.so.X.Y may be missed anyway.
# Ruby passenger_native_support.so is packaged for system ruby only.
passenger_env_var PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY 0;
passenger_env_var PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY 0;
Code:
# cat /usr/share/passenger/phusion_passenger/locations.ini
[locations]
packaging_method=rpm
bin_dir=/usr/bin
support_binaries_dir=/usr/lib64/passenger/support-binaries
lib_dir=/usr/lib64/passenger
helper_scripts_dir=/usr/share/passenger/helper-scripts
resources_dir=/usr/share/passenger
include_dir=/usr/share/passenger/include
doc_dir=/usr/share/doc/passenger-6.0.2/passenger
ruby_libdir=/usr/share/passenger
node_libdir=/usr/share/passenger/node
apache2_module_path=/usr/lib64/httpd/modules/mod_passenger.so
ruby_extension_source_dir=/usr/share/passenger/ruby_extension_source
nginx_module_source_dir=/usr/share/passenger/ngx_http_passenger_module
 
Last edited:
Issue somewhat resolved. Uninstalled nginx, passenger server, node.js, and ruby via Add/Remove Components.
nginx config now testing properly:
Code:
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

However, when realoading nginx config in Webserver Configurations Troubleshooter, I'm still getting the error.
plesk1.png

Is there any way to clean that up?
 
Back
Top