-
Notifications
You must be signed in to change notification settings - Fork 549
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
How to install Passenger as an Nginx module? Tutorial doesn't explain. #2404
Comments
If you install passenger as per the instructions here: https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/installations/oss/ownserver/ruby/standalone/ (choose red hat 8 from the dropdown) then you should have all the files available, and should be able to proceed. |
Thanks, I'll give that a try. Can this information be added to the documentation? At present the instructions to which I linked above offer no guidance. |
I installed Passenger standalone as per the documentation and still had exactly the same problem.
returns
but there is no file there.
returns
The Passenger install seems to be OK:
returns "Everything looks good"
returns
So I am pretty sure Passenger Standalone is installed. I downloaded the nginx source code and tried to configure it like this:
The configure process ended with this error:
Can you suggest what might be the problem? Installing Passenger does not give me the module file, so how can I get it? |
You're right I completely forgot that some of the sources were split off into the |
Thank you! I ran this:
And then my .configure code as above, and then
This ran and has created the file
That's great :) |
Instead of analysing the compatibility string and trying to understand the boolean list of flags, using nginx -V seems a much easier way to find the flags with which Nginx was compiled? I found that idea here. |
That doesn't actually always work, there are Nginx packages out there where the configure flags don't match the compatibility string. |
I must have been lucky with the flags... It's almost working now but I am getting an Nginx error:
There is no actual folder /var/www/myapp/bundle/public but presumably Meteor does some magic with symlinks, as that was never a problem before? I've used a copy of myapp.conf from the previous (working) version which used Nginx + Passenger. The file structure in /var/www/myapp is unchanged, so I guess there must be something different about configuring a Meteor app when using Passenger as a dynamic module? I have set (With Passenger as a module, is there any way to inspect what it's doing? passenger-status says "Passenger doesn't seem to be running".) Here's a snippet from myapp.conf, which as I say works when Nginx and Passenger are installed together.
Thank you for your help so far. If you have any thoughts as to what needs to be configured differently when running Passenger as a dynamic module, that would be awesome also. |
Just some quick questions to rule out some easy to forget things: do you |
Thanks! Yes: /etc/nginx/nginx.conf
...
And I have run:
There are no errors in the log, only the "is not found" message. |
Forgive me if this is a stupid question, but you don't have to include any configuration files do you, as in a normal build? e.g. nginx.conf
Just checking whether the dynamic module is entirely self contained or whether we need to specify things like
|
Yeah all configuration must be done, just like with the compiled-in module. |
Yes, the module just tells nginx how to talk to passenger. To find out what the crash is about, run nginx directly with |
Thank you! I have an exciting new error now that I have followed your instructions and set:
Nginx error.log:
Permissions on PassengerAgent are:
|
Hmm, given the permissions, I think the env setup process is running as the |
Is that worker_processes? nginx.conf
My app bundle is owned by a dedicated user, as recommended in the tutorials, but I don't know how you tell Passenger about that...in the compiled version it just works! |
Thank you so much for your patient and excellent help. I have got it working, by changing ownership of PassengerAgent, and should be OK now. (somewhere in all the messing about I had removed the passenger_ruby setting, that was the final thing to get it right). You are a hero. |
For the documentation, modern Nginx is build using --with-compat, I think? So the doc could suggest that people use nginx -V and if it was built using --with-compat, they can do:
then I think you don't need to actually make and install nginx do you? You can do:
so you won't interfere with the system nginx. |
** Operating system **
RedHat 8 Linux
** Nginx version **
1.20.1
https://www.phusionpassenger.com/library/install/nginx/install_as_nginx_module.html
** Passenger version **
6.0.12
** Passenger installation method **
Static or dynamic module for Nginx
I have hit the issue that the repo to install Passenger and Nginx on RedHat 8 installs Nginx 1.14.1, which is an unacceptable regression for us: phusion/passenger_rpm_automation#18
I am therefore trying to follow the tutorial to install Passenger as a module of Nginx, and I am clearly missing something obvious, because the steps in the doc do not work.
Here's the doc I'm trying to follow:
https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install_as_nginx_module.html#installing-passenger-as-a-normal-or-dynamic-nginx-module
The doc says "The value for /path-to-passenger-module can be obtained with the command:"
passenger-config --nginx-addon-dir
If I haven't installed Passenger, then of course that fails with "command not found". If I have installed Passenger, it returns this:
/opt/passenger-6.0.12/src/nginx_module
However there is no folder or file at that location and the Nginx compile fails.
I assume that I need to get or build the Passenger module, but I haven't found any instructions on where to download it, or how to build it. Can you give me some guidance how to do this, and could this information be added to the tutorial?
The text was updated successfully, but these errors were encountered: