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
+17.6k Golang : Read data from config file and assign to variables
+10.8k Golang : Sieve of Eratosthenes algorithm
+12k Golang : Split strings into command line arguments
+8.6k Golang : How to join strings?
+14.4k Golang : Execute function at intervals or after some delay
+16k Golang : Loop each day of the current month example
+13.2k Golang : Generate Code128 barcode
+6.7k How to let Facebook Login button redirect to a particular URL ?
+8.9k Golang : Get SPF and DMARC from email headers to fight spam
+15k Golang : Save(pipe) HTTP response into a file
+11k Golang : Roll the dice example
+7.4k SSL : How to check if current certificate is sha1 or sha2 from command line