• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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 Passenger does not work on nginx

olegrom

New Pleskian
Hello,

after upgrading to Onyx I receive the following error and can't reconfigure websites configurations.

nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
 
Had the same issue here after upgrading and adding passenger afterwards (wasn't installed before). Solved it with deinstalling NGINX and reinstalling it.
 
Did you reinstall sw-nginx package? Did it couple of times - same thing happens. Running Debian 8.
 
@olegrom, @cool_sh

Did you check that the following directive

passenger_enabled on;

is present in a server, http or location block in one of the relevant Nginx config files?

If I am not mistaken, just check that with the command: grep -Rin passenger /etc/nginx/*.conf

Hope the above helps!

And if it did not help, just let me know, so I can investigate the issue.

Regards!
 
Basically, nginx is telling you that it doesn't know what passenger_root directive means, i.e. passenger module is not loaded. Please make sure that both of these files either exist or do not exit at the same time:
  1. /etc/nginx/conf.d/phusion-passenger.conf - should contain passenger_root directive;
  2. /etc/nginx/modules.conf.d/phusion-passenger.conf - should contain load_module directive.
Please also post output of # dpkg -l sw-nginx '*passenger*' | cat
 
I have the same issue in Centos.

I checked and I do have
  1. /etc/nginx/conf.d/phusion-passenger.conf - it contains passenger_root directive;
  2. /etc/nginx/modules.conf.d/phusion-passenger.conf - it contains load_module directive.
Also I checked:
[root nginx]# rpm -qa | grep nginx
sw-nginx-1.11.4.1-centos6.16100518.x86_64
[root nginx]# rpm -ql sw-nginx-1.11.4.1-centos6.16100518.x86_64
/etc/init.d/nginx
/etc/logrotate.d/nginx
/etc/nginx/conf.d
/etc/nginx/fastcgi.conf
/etc/nginx/fastcgi.conf.default
/etc/nginx/fastcgi_params
/etc/nginx/fastcgi_params.default
/etc/nginx/koi-utf
/etc/nginx/koi-win
/etc/nginx/mime.types
/etc/nginx/mime.types.default
/etc/nginx/modules.conf.d
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf.default
/etc/nginx/scgi_params
/etc/nginx/scgi_params.default
/etc/nginx/uwsgi_params
/etc/nginx/uwsgi_params.default
/etc/nginx/win-utf
/etc/sysconfig/nginx
/usr/sbin/nginx
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/nginx.1.gz
/usr/share/nginx/modules/ngx_http_passenger_module.so
/var/lib/nginx
/var/log/nginx


Any ideas?

Thanks for your help.
 
I too solved it with deinstalling NGINX and reinstalling it.

I have the same issue in Centos.

I checked and I do have
  1. /etc/nginx/conf.d/phusion-passenger.conf - it contains passenger_root directive;
  2. /etc/nginx/modules.conf.d/phusion-passenger.conf - it contains load_module directive.
Also I checked:
[root nginx]# rpm -qa | grep nginx
sw-nginx-1.11.4.1-centos6.16100518.x86_64
[root nginx]# rpm -ql sw-nginx-1.11.4.1-centos6.16100518.x86_64
/etc/init.d/nginx
/etc/logrotate.d/nginx
/etc/nginx/conf.d
/etc/nginx/fastcgi.conf
/etc/nginx/fastcgi.conf.default
/etc/nginx/fastcgi_params
/etc/nginx/fastcgi_params.default
/etc/nginx/koi-utf
/etc/nginx/koi-win
/etc/nginx/mime.types
/etc/nginx/mime.types.default
/etc/nginx/modules.conf.d
/etc/nginx/nginx.conf
/etc/nginx/nginx.conf.default
/etc/nginx/scgi_params
/etc/nginx/scgi_params.default
/etc/nginx/uwsgi_params
/etc/nginx/uwsgi_params.default
/etc/nginx/win-utf
/etc/sysconfig/nginx
/usr/sbin/nginx
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/nginx.1.gz
/usr/share/nginx/modules/ngx_http_passenger_module.so
/var/lib/nginx
/var/log/nginx


Any ideas?

Thanks for your help.
 
Ran into this one too on Centos.

The following process worked for me:

`yum remove sw-nginx
yum install sw-nginx`

Then I started nginx from the services management in Plesk and this worked just fine.
 
Hi,
had this error message:
nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

solved it by enabling nginx which was disabled:

[root@server ~]# /usr/local/psa/admin/sbin/nginxmng -e
[root@server ~]# /etc/init.d/nginx status
nginx (pid 9873) is running...

sources:
Nginx phusion_passenger throws a configuration template error: unknown directive "passenger_root"
Getting nginx disabled message while trying to start nginx service in plesk.
 
Reinstall didn't help me. I had the conf file, but not the module loaded as written in #5. So I checked whether Phusion Passenger Server is installed. It was not. So I installed it via
Tools & Settings -> “Updates & Upgrades”. Clicked “Add/Remove Components” on the next screen. Expandedthe “Web hosting” section and marked the “Phusion Passenger server” component for installation. After Installation the module wasn't loaded. So I created the file /etc/nginx/modules.conf.d/phusion-passenger.conf with the content

load_module /usr/share/nginx/modules/ngx_http_passenger_module.so;

Then checked config with ngingx -t and ran plesk repair web -y -v
 
It seems an old topic, but we've encountered the same issue when the Phusion Passenger module is enabled in Plesk.
Configuration is checked as stated above and OS and Plesk Onyx are up-to-date.

Any update on this issue?
 
Back
Top