系统中的 nginx 是这样安装的
sudo apt-get install nginx
安装了 passenger 后
gem install passenger
还需安装 nginx module 才能在 nginx 中配置使用它。在安装时
passenger-install-nginx-module
提示
Automatically download and install Nginx?
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.
Do you want this installer to download, compile and install Nginx for you?
1. Yes: download, compile and install Nginx for me. (recommended)
The easiest way to get started. A stock Nginx 1.4.4 with Passenger
support, but with no other additional third party modules, will be
installed for you to a directory of your choice.
2. No: I want to customize my Nginx installation. (for advanced users)
Choose this if you want to compile Nginx with more third party modules
besides Passenger, or if you need to pass additional options to Nginx's
'configure' script. This installer will 1) ask you for the location of
the Nginx source code, 2) run the 'configure' script according to your
instructions, and 3) run 'make install'.
Whichever you choose, if you already have an existing Nginx configuration file,
then it will be preserved.
【问题 1】这样再次安装 nginx 的话,和原来的版本没有冲突吗?
直接安装的 nginx 的启动方法是
sudo service nginx start
sudo service nginx restart
sudo service nginx stop
通过 passenger-install-nginx-module
安装的 nginx 的启动方法是
sudo nginx
sudo nginx -s reload
sudo nginx -s stop
【问题 2】为什么会有这样的区别呢?
【问题 3】在已经存在 nginx 的系统中,有其它方式安装 passenger 的 nginx module 吗?