Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown directive: "passenger_enabled" in nginx.conf server block #2497

Closed
daBee opened this issue Sep 4, 2023 · 6 comments
Closed

Unknown directive: "passenger_enabled" in nginx.conf server block #2497

daBee opened this issue Sep 4, 2023 · 6 comments

Comments

@daBee
Copy link

daBee commented Sep 4, 2023

Question 1: What is the problem?
I cannot get nginx to start due to a directive:

nginx: [emerg] unknown directive "passenger_enabled" in /etc/nginx/conf.d/example.conf:22
nginx: configuration file /etc/nginx/nginx.conf test failed

That's in the server block:

passenger_enabled     on;

Question 2: Passenger version and integration mode:
Passenger processes:

rich        5581  0.0  0.0   3876  2024 pts/0    S+   20:27   0:00 grep Passenger

passenger status:

Phusion Passenger(R) Standalone is not running, according to PID file /home/user3/sites/example/passenger.3000.pid

nginx.x86_64                                1:1.20.1-14.el9.alma.1             @appstream
nginx-core.x86_64                           1:1.20.1-14.el9.alma.1             @appstream
nginx-filesystem.noarch                     1:1.20.1-14.el9.alma.1             @appstream
passenger.x86_64                            6.0.18-1.el9                       @passenger

passenger-config about:

Could not find sinatra-3.1.0, httparty-0.21.0, awesome_print-1.9.2, bcrypt-3.1.19, openssl-3.1.0, net-ssh-7.2.0, cgi-0.3.6, smarter_csv-1.8.5, tilt-2.2.0, uuidtools-2.2.0, net-smtp-0.3.3, mail-2.8.1, sequel-5.72.0, mustermann-3.0.0, rack-2.2.8, rack-protection-3.1.0, mini_mime-1.1.5, multi_xml-0.6.0, net-protocol-0.2.1, net-imap-0.3.7, net-pop-0.1.2, bigdecimal-3.1.4, ruby2_keywords-0.0.5, timeout-0.4.0, date-3.3.3 in locally installed gems
Run `bundle install` to install missing gems.

Question 3: OS or Linux distro, platform (including version):

AlmaLinux release 9.2 (Turquoise Kodkod)

Question 4: Passenger installation method:
[X] Phusion YUM repo

Question 5: Your app's programming language (including any version managers) and framework (including versions):

rbenv 1.2.0-64-gaf9201e
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]

Question 6: Are you using a PaaS and/or containerization? If so which one?
None

Question 7: Anything else about your setup that we should know?
None that I know of at this time

@daBee
Copy link
Author

daBee commented Sep 4, 2023

Now that I have passenger.conf loading, its first directive throws an error:

nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/passenger.conf:1

Here is that file:

passenger_root /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/user3/.rbenv/shims/ruby;
passenger_instance_registry_dir /var/run/passenger-instreg;

Also this file does not exist:

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

@CamJN
Copy link
Member

CamJN commented Sep 4, 2023

Is the passenger Nginx module package installed or just the passenger package?

@daBee
Copy link
Author

daBee commented Sep 4, 2023

It is not installed. But...

[Mon Sep 04 11:38:13 user3@server_f ~/sites/example] sudo dnf install nginx-mod-http-passenger -y
Last metadata expiration check: 2:48:52 ago on Mon Sep  4 08:49:34 2023.
Error:
 Problem: package nginx-mod-http-passenger-6.0.18-1.el9.x86_64 requires nginx = 1:1.22.1, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package nginx-1:1.22.1-3.module_el9.2.0+20+2a475c1b.alma.x86_64 is filtered out by modular filtering
  - package nginx-1:1.22.1-3.module_el9.2.0+35+933e48af.alma.1.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
nginx version: nginx/1.20.1

@CamJN
Copy link
Member

CamJN commented Sep 4, 2023

That's due to a change to which nginx package we build against. Our users were very insistent that they didn't like us building against the default nginx, and would prefer the newest possible. The steps to migrate are here: #2485

@daBee

This comment was marked as off-topic.

@CamJN

This comment was marked as off-topic.

@daBee daBee closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants