nginx: [emerg] unknown directive "passenger_enabled"
In my opinion, nginx in a way is better than Apache. It has low memory footprint and configuring it was easier and in straightforward manner. I was helping out a friend who is a Ruby On Rails developer migrating his Apache based server to Nginx couple of days back. When he tried to start nginx server, he got these error messages :
nginx: [emerg] unknown directive "passenger_enabled" in /etc/nginx/conf.d/default.conf:6
nginx: configuration file /etc/nginx/nginx.conf test failed
Upon further investigation, the error messages indicate that nginx was compiled without Phusion Passenger support.
To fix this :
sudo gem install passenger
cd /var/lib/gems/1.9.1/gems/passenger-2.2.11/bin
sudo ./passenger-install-nginx-module
restart nginx and the error message is gone.
References :
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+33.5k Golang : How to check if slice or array is empty?
+31.5k Golang : Get local IP and MAC address
+34k Golang : Create x509 certificate, private and public keys
+17.8k Golang : Login and logout a user after password verification and redirect example
+41.1k Golang : How to count duplicate items in slice/array?
+3.6k Java : Get FX sentiment from website example
+10.4k Golang : Generate 403 Forbidden to protect a page or prevent indexing by search engine
+36.2k Golang : Save image to PNG, JPEG or GIF format.
+18.5k Golang : Generate thumbnails from images
+22.1k Golang : Securing password with salt
+25.4k Golang : convert rune to integer value
+11.9k Golang : Clean formatting/indenting or pretty print JSON result