我已经在 Ubuntu 18.04 上安装了 NGINX 和Passenger,但在获取任何有意义的关于我的配置问题的指示时遇到了问题。
/etc/nginx/nginx.conf
http {
# pretty much the default configuration except for this...
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
include /etc/nginx/sites-enabled/*;
}
/etc/nginx/sites-enabled/my_app(这是指向可用站点的符号链接)
server {
listen 80;
server_name my.app.ip.address;
root /path/to/public/folder;
passenger_enabled on;
passenger_app_root /path/to/app/root; # not public folder
passenger_ruby /home/appuser/.rvm/gems/ruby-2.0.0-p648/wrappers/ruby;
rails_env staging;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
当我尝试通过网络浏览器访问 IP 地址时,它拒绝连接并建议我检查连接和防火墙。关于这个问题可能是什么的任何想法?