经过多次重试,我似乎无法在Passenger
上加载FreeBSD 11.1
。我已经完全拥有deinstalled
nginx。我已将配置设置为安装Passenger
,并且安装显示5.3.4正常。我什至收到此安全报告:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/sbin/nginx
/usr/local/libexec/nginx/ngx_http_passenger_module.so
然后,我知道每次尝试安装它都会更改,因此我会测试该系统是否有任何Passenger
反馈。我有一个bash
脚本,其中包含以下内容:
passenger-config --ruby-command
passenger-config --root
passenger-config validate-install
passenger-config system-metrics
passenger-config compile-agent
passenger-config --make-locations-ini
bundle exec passenger-status
passenger-status
passenger status
输出:
passenger_help.sh: line 7: passenger-config: command not found
passenger_help.sh: line 8: passenger-config: command not found
passenger_help.sh: line 9: passenger-config: command not found
passenger_help.sh: line 10: passenger-config: command not found
passenger_help.sh: line 11: passenger-config: command not found
passenger_help.sh: line 12: passenger-config: command not found
bundler: command not found: passenger-status
Install missing gem executables with `bundle install`
passenger_help.sh: line 14: passenger-status: command not found
passenger_help.sh: line 15: passenger: command not found
我希望config
会引导make
安装正确的Passenger
,但根本不会安装它。我要使用其他包装吗? Fusion的网站没有具体说明FreeBSD
。我对如何使它工作一无所知。
任何建议都感谢我如何使它正常工作。干杯
答案 0 :(得分:1)
由于我与nginx一起使用乘客的票价,因此没有完全支持的pkg。 必须执行以下步骤
portsnap fetch extract [or]
portsnap fetch update
cd /usr/ports/www/nginx
make config # select passenger!
make install clean # is installing nginx with passenger support
# this command installs ruby gem sources
gem install passenger
# change to ruby gem files and compile the nginx module
cd /usr/local/lib/ruby/gems/2.4/gems/passenger-???
rake nginx:as_dynamic_module
然后在
顶部添加以下行 # /usr/local/etc/nginx/nginx.conf
load_module /usr/local/libexec/nginx/ngx_http_passenger_module.so;
http {
passenger_root /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.7;
passenger_ruby /usr/local/bin/ruby;
passenger_load_shell_envvars off;
passenger_sticky_sessions on;
...
}
并在网站定义内添加以下行
# /usr/local/etc/nginx/sites/default.conf
server {
listen 80;
server_name ... ;
passenger_enabled on;
passenger_min_instances 1;
rails_app_spawner_idle_time 0;
# rails_env development;
...
}