'Nginx seems to have no idea of "passenger_root" directive despite correct installation steps of passenger
I'm using this guide to install passenger with nginx on a CentOS7: https://www.phusionpassenger.com/library/install/nginx/install/oss/el7/
I fail at the end of step 4:
sudo service nginx restart
Redirecting to /bin/systemctl restart nginx.service
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
Further examining of "journalctl -xe" shows this:
nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/passenger.conf:8
I tried to wipe nginx and passenger out and reinstalling them, tried to follow the steps from the beginning... I've got no more ideas. Interesting is though that nginx is being installed from epel, not from passenger repo, but it also seems that the latter has no nginx only passenger.
yum info nginx
Geladene Plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.rz.uni-frankfurt.de
* epel: mirror.imt-systems.com
* extras: ftp.plusline.net
* updates: ftp.plusline.net
Installierte Pakete
Name : nginx
Architektur : x86_64
Epoche :1
Version : 1.16.1
Ausgabe : 1.el7
Größe : 1.6 M
Quelle : installed
Aus Quelle : epel
What's wrong? How can I solve this?
Solution 1:[1]
Figured it out after my comment a year ago and had to figure it out again today. So guess this answer is as much for myself in the future if I have to install it again!
Following the Phusion guide to installing NGINX and Passenger didn't seem to load the modules correctly. I believe this may be due to NGINX supporting Dynamic modules in recent versions.
To fix this you need to add the Passenger dynamic module to NGINX.
If you already have NGINX installed, I installed nginx-mod-http-passenger and this added the correct configuration files for me too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ThorTL67 |
