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
+5.8k Golang : Fixing Gorilla mux http.FileServer() 404 problem
+12.1k Swift : Convert (cast) Int to String ?
+38.1k Golang : UDP client server read write example
+12.3k Golang : Get constant name from value
+6.7k Gogland : Where to put source code files in package directory for rookie
+9.6k Golang : Bubble sort example
+10.3k Golang : Display a text file line by line with line number example
+6.3k Golang : Dealing with postal or zip code example
+16.1k Golang : Iterate linked list example
+17.2k Golang : Read binary file into memory
+6.6k Golang : Gorrila set route name and get the current route name
+5.8k Mac/Linux/Windows : Get CPU information from command line