I have a server running with nginx serving two php websites, right now I want to make it serving a rails app, I've googled, but there no notes about add passenger support to a existed nginx, all of them are telling me run passenger-install-nginx-module to build a nginx.
Can I add passenger support to my nginx instead of rebuild it?
Thanks for any helps.
You still need to rebuild nginx. If you run passenger-install-nginx-module you will see this output:
Nginx doesn't support loadable modules such as some other web servers do, so in order to install Nginx with Passenger support, it must be recompiled.
See Installing Passenger as a normal Nginx module for steps.
cd /path-to-nginx-source-dir
./configure --prefix=/opt/nginx \
--add-module=$(passenger-config --nginx-addon-dir) \
--add-module=/path-to-some-nginx-module
make
sudo make install
The value for /path-to-passenger-module can be obtained with the command:
passenger-config --nginx-addon-dir
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With