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
+8.5k Golang : Replace a parameter's value inside a configuration file example
+17.5k Nginx + FastCGI + Go Setup.
+8.9k Golang : Removes punctuation or defined delimiter from the user's input
+5.1k Golang : Accessing dataframe-go element by row, column and name example
+6.5k Golang : Executing and evaluating nested loop in html template
+6.1k Golang : Regular Expression find string example
+4.6k Golang : Derive cryptographic key from passwords with Argon2
+35.1k Golang : Comparing date or timestamp
+29.9k Golang : Call a function after some delay(time.Sleep and Tick)
+6.4k Android Studio : Import third-party library or package into Gradle Scripts
+15.4k Golang : When to use init() function?