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
+11.3k Golang : Extract part of string with regular expression
+6k Golang : Takes a plural word and makes it singular
+11.8k Generate salted password with OpenSSL example
+5.6k Golang : How to determine if request or crawl is from Google robots
+4.2k Unix/Linux : secure copying between servers with SCP command examples
+38.3k Golang : UDP client server read write example
+13.5k Golang : Submit web forms without browser by http.PostForm example
+11.6k Golang : How to calculate the distance between two coordinates using Haversine formula
+17k Golang : Iterating Elements Over A List
+19.2k Golang : Pipe output from one os.Exec(shell command) to another command
+32.4k Golang : Converting a negative number to positive number
+7.5k Golang : Count leading or ending zeros(any item of interest) example