passenger

Where should I set HTTP headers, such as Expires?

爷,独闯天下 提交于 2019-12-08 09:50:25
问题 I want to deploy an app using Sinatra on Phusion Passenger w/ nginx. If I want to set the Expires header on my static content - stylesheets, say - there are appear to be three places where I could accomplish this. In my Sinatra app, using the API With Rack middleware In the server config for my deployment Which of these methods is the best place for setting HTTP headers? 回答1: After talking though and answering this question and seeing the comment above, I think I have figured out the answer

Missing Rails gem error, but its installed!

大憨熊 提交于 2019-12-08 07:56:46
问题 So I'm new to rails and am actually following a video tutorial from Lynda.com in order to learn it. I didn't follow the steps to install on the video because I heard of RVM and its been great so far with getting everything setup. But I'm still early on in the video and can't get passed something really simple... so I'm hoping someone can help me out. Heres some background: I have RVM installed and created 1.8.7@rails2.3.8. I was able to install both ruby and rails, and everything here is fine

HTTP_IF_MODIFIED_SINCE header not passed to Rails app (Nginx, Passenger)

[亡魂溺海] 提交于 2019-12-08 04:28:22
问题 I am trying to use the HTTP_IF_MODIFIED_SINCE header in my app to determine if resources are stale/fresh and render 200/304 in those cases. In my dev environment everything works fine but I can't for the life of me get it to work in production. I am using Passenger 3.0.11 and Nginx 1.0.13. As you see below, I tried proxy_pass_header, proxy_set_header, passenger_pass_header and passenger_set_cgi_param. The last one actually sets a HTTP_IF_MODIFIED_SINCE header but it is empty... Any help/ideas

Rails Phusion Passenger error after updates

岁酱吖の 提交于 2019-12-08 02:38:18
问题 I updated to rails 3.2.17 from 3.2.1. When I run bundle update and bundle install, everything passes with no errors or warnings. Then I restart my server, and when I load my site, I get the PASSENGER: WEB APPLICATION COULD NOT BE STARTED page. Below is a copy of everything listed on that page. Any ideas what I might need to change or check to get things running? It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems,

(Using phusion passenger + Nginx) running same rails app with multiple instance names with same port (80)

南笙酒味 提交于 2019-12-08 02:20:27
问题 Note : i am newbie to ruby on rails and server hosting , i unable to express my vision as question , please forgive me if i am wrong or correct me. Hi , i am having an one product developed using ruby on rails , going to host in an dedicated server with 32 GB Ram and 8 Core Server Processor. Each client should have seperate DB and separate rails instance. I am replicating - duplicating code for each client with separate folders and giving different database names and so each serving as an

Why am I getting 404 errors with Sinatra with Passenger under nginx?

痞子三分冷 提交于 2019-12-08 01:04:18
问题 I have a Sinatra-based app that runs fine locally. I moved it to a nginx-based server with Passenger and now all my links to files in my apps /public are returning 404 errors. The primary app runs, is able to access the HAML templates in /view , which render correctly. The files exist and permissions are correct; I can open and edit them so I know they're there. In my HAML templates I'm referring to the files that I can't access like this: %script{ :src => 'js/jquery.js' } %link{ "rel" =>

Does Node.js expose per-HTTP-request environment variables?

谁都会走 提交于 2019-12-08 00:33:29
问题 Working with Node.js via Passenger 5.0.15 on Apache, I am seeking a method to retrieve per-HTTP-request environment variables inside a Node.js http.IncomingMessage object or any alternative. An example of what I mean by a per-request environment variable, would be one set by Apache mod_rewrite. This is not a real-world example, and I'm aware any path-related details could be easily retrieved in the Node app. Apache modules may set environment variables for the request 1 : # Apache sets an

Django - Can't pass Environment Variable to Apache/Passenger on the WSGI Interface

ε祈祈猫儿з 提交于 2019-12-07 21:06:04
问题 I'm looking for a solution, I can't pass to apache a variable define in /etc/profile. Here is what I am trying to set: I have a django application that I deploy through Apache/Passenger (modrails) through the WGSI interface. In my settings.py I am using this python command : ENVIRONMENT = os.getenv('ENV', 'PROD') so if the ENVIRONMENT variable is not define it goes to the production settings by default. That is helping me to manage which DB I connect to and activate debugging tools. It is

Getting Rails production to run on port 80

淺唱寂寞╮ 提交于 2019-12-07 18:54:58
问题 I'm trying to get my rails app to run in production mode but I've been having a bit of difficulty. I'm using passenger with apache and am running Ubuntu 12.04. I have my production database configured and created, and passenger set up. Status is as follows: $ rvmsudo passenger-status Version : 4.0.56 Date : 2014-12-25 01:54:20 +0000 Instance: 7264 ----------- General information ----------- Max pool size : 6 Processes : 0 Requests in top-level queue : 0 ----------- Application groups --------

What are the advantages of using Passenger over a Mongrel Cluster?

别来无恙 提交于 2019-12-07 17:20:26
问题 This is probably the silliest question today but... The Rails team & many others recommend using passenger instead of a mongrel cluster, but I cannot find a clear list of exact benefits / advantages of this or what the potential pitfall are. Just wondering if anyone can help explain this? Also is passenger its own server or does it use mongrel under the hood? Thanks! 回答1: Before Passenger, Mongrel was the way to go, but a Mongrel cluster can be a nuisance to keep properly tuned. As your