passenger

Passenger sub uri's

时光总嘲笑我的痴心妄想 提交于 2020-02-05 14:56:24
问题 The Phusion Passenger instructions are great in most regards. They have far better-than-average install guides on setting up NGINX, the passenger app, testing python, and so forth. The instructions on setting up several separate apps on a single server are, well, deficient. The main reason I adopted Passenger is the ability to host several apps. I followed the Phusion Passenger instructions for setting up NGINX server with a sub URI (https://www.phusionpassenger.com/library/deploy/nginx

Rails 3, apache & passenger, send_file sends zero byte files

扶醉桌前 提交于 2020-01-30 04:10:12
问题 I'm struggling with send_file with rails 3.0.9 running ruby 1.9, passenger 3.0.8 on apache on ubuntu lucid The xsendfile module is installed and loaded into apache root~# a2enmod xsendfile Module xsendfile already enabled Its symlinked correctly in mods-enabled lrwxrwxrwx 1 root root 32 Aug 8 11:20 xsendfile.load -> ../mods-available/xsendfile.load config.action_dispatch.x_sendfile_header = "X-Sendfile" is set in my production.rb using send_file results in zero byte files being sent to the

Rails: How should Phusion Passenger and I18n.locale behave?

只谈情不闲聊 提交于 2020-01-24 09:33:21
问题 I have a Rails 2.2 web app running on Passenger / REE I set the default locale in config/environment.rb config.i18n.default_locale = 'en-GB' The first request seems to have no locale set in I18n.locale If I the visit a page with a before_filter that sets I18n.locale every subsequent visit to any controller even if it doesn't have that same before_filter setting the I18n.locale get an I18n.locale of whatever was set, say, en-US . On Mongrel with the same code each request gets a locale of en

For a rack app, how do I make passenger-standalone serve the output of .erb files rather of sending the .erb file itself?

霸气de小男生 提交于 2020-01-17 09:28:32
问题 I have a simple config.ru rack app where I only require and run rack-server-pages to provide dynamic pages in a quick and convenient way. This config.ru app is served by phusion passenger-standalone (which uses nginx internally). .erb files are processed and served correctly, except when I explicitely add the .erb extension to a URL (for a .erb file). In that case the server will send me the .erb file for download, rather than its output. Obviously I would like to avoid that. To make it

How can I get passenger-config restart-app to work?

删除回忆录丶 提交于 2020-01-13 09:24:08
问题 Rails 4.1 on Ubuntu 14.04 with rbenv and ruby 2.2.1. Using capistrano with the capistrano-passenger gem, but the restart at the end fails: INFO [8213c63a] Running /usr/bin/env passenger-config restart-app /home/deployer/my_app --ignore-app-not-running as deployer@mysite.com DEBUG [8213c63a] Command: passenger-config restart-app DEBUG [8213c63a] Please pass either an app path prefix or an app group name. See --help for more information. When I try to run this command at the command line via

nginx + passenger + rails 3.1 = 502 bad gateway?

六月ゝ 毕业季﹏ 提交于 2020-01-12 06:20:30
问题 I have the latest Nginx running with Passenger, SQLite and Rails 3.1. Somehow, when I have Passenger running for a while, I start getting "502 bad gateway" errors when visiting my website. Here is a snippet from my Nginx error log: 2011/06/27 08:55:33 [error] 20331#0: *11270 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xx.x, server: www.example.com, request: "GET / HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host:

How to deploy multiple rails app on a single IP (Apache + Passenger)?

那年仲夏 提交于 2020-01-10 18:24:12
问题 I want to deploy multiple rails app on a single server. If I had a domain name, I would have easily done that using subdomains as server name in virtual hosts. My problem is that I do not have a domain name. Can I do something like 70.42.89.11/app_1 as one server name and 70.42.89.11/app_2 as another. Or are there any other solutions? 回答1: Yes. The Passenger guide calls this "Deploying to a Sub URI" http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rack_to_sub_uri

nginx subdomain failure with Rails app and passenger

做~自己de王妃 提交于 2020-01-07 05:30:34
问题 I am totally new to nginx deployment and having problem setting up the subdomain for rails app which is running in passenger. My app structure is like this -- sss.com (parent domain) -- sub.sss.com (subdomain) -- zzz.com (which will be redirected to sub.sss.com) For more clear perspective, think of the gmail structure -- google.com (parent domain) - mail.google.com (subdomain) -- gmail.com (which will be redirected to mail.google.com) And remember sub.sss.com is not just a directory under sss

Configuring NGINX to serve Ruby on Rails and Drupal websites

我是研究僧i 提交于 2020-01-07 03:17:09
问题 As I try to migrate my Drupal website from Bluehost to DigitalOcean, I am encountering difficulties with my nginx setup. I have a live Ruby on Rails app living in ~/Kiji and I'd like for the Drupal one to go into ~/EAS. Here is my current nginx.conf file (which isn't configured as I do not understand exactly what I need to change - I have taken the setup from this page) worker_processes 1; events { worker_connections 1024; } http { passenger_root /home/daniG2k/.rvm/gems/ruby-2.1.2/gems

Ruby cgi needs to reload apache for new value?

徘徊边缘 提交于 2020-01-06 18:03:57
问题 I have phusion-passenger installed with apache on Ubuntu. In my config.ru, I have the following code: require 'cgi' $tpl = CGI.new['myvar'] + '.rb' app = proc do |env| [200, { "Content-Type" => "text/html" }, [$tpl]] end run app So then when I go to my browser at http://localhost/?myvar=hello , I see the word hello printed out, which is fine. Then I change the url to http://localhost/?myvar=world , but the page still shows hello . Only after I reload apache will the page show world . Before