Tag Info

Hot answers tagged

10

Nginx is far more lightweight, taking up less memory and other resources. On the other hand, Apache has more esoteric modules, built-in support for many more things, and is more widely used, both in general (so more docs and blog posts on using it for different tasks) and with Passenger (and so more of the kinks will have been found and fixed already). On ...


8

Not until FastCGI supports "authorizer" mode. The Shibboleth 2 documentation describes a FastCGI SP application but explains that it doesn't work with Nginx because it lacks the "authorizer" mode needed for the filter. An Nginx thread shows that many people want the "authorizer" mode but it's too difficult to implement. When people try they give up. Poster ...


8

If you used config.force_ssl = true in your environment configuration, and then later turn it off, your browser may still only make connections over ssl. Rails sends an HSTS header when force_ssl is true, which will cause some browsers to only allow connections over HTTPS to the domain in question, regardless of what's entered in the address bar. This ...


8

That is verbose output from the optipng utility for shrinking PNG images. You may suppress this output with the --quiet option. Though probably one of your gems is calling it and you have little control over whether it passes the option.


6

It's up to you whether you want to disable it or not. If you do nothing else, it'll be gone if/when you reboot. If you want it permanent, you'll have to add it to /etc/fstab. If you do want to disable it: sudo swapoff /swap


6

If you don't have it installed. $ sudo passenger-install-apache2-module You need to run that so that the apache mod_passenger.so can be compiled after installing the gem (gem install passenger) And take a look at the output presented by the installer. It will show you where the files are. In fact, it shows you exactly how the configuration must look.


6

There's an excellent guide on: https://github.com/tecnh/gollum/wiki/Gollum-and-Passenger The main points are: add a config.ru to lib/gollum/frontend Point your document root to lib/gollum/frontend/public Use the following config.ru as a base, set wiki path accordingly (I had to add the bundler setup part) #!/usr/bin/ruby require 'rubygems' require ...


6

You can configure how many Rails processes Apache/passenger spawns. For your size (3 concurrent requests) you should be fine with 2 rails processes: Set these in your apache config: PassengerMaxPoolSize 2 PassengerMaxInstancesPerApp 2 The MaxPoolSize determines how many instances can be started maximally, the MaxInstancesPerApp determines how many ...


6


6

sudo /etc/init.d/apache2 restart This method uses your Linux distro's init scripts to restart the process. These scripts are run at boot time to start apache. sudo apachectl restart This method uses the apachectl control program. In almost every occasion I would recommend the use of apachectl the to maniuplate the apache daemon. You have finer grained ...


5

Depending on the version of Phusion Passenger, it should ether be possible to do yes | passenger-install-nginx-module (for version 2.0.x) or passenger-install-nginx-module --auto for versions greater than 2.1.


5

Create the file "config.ru", add this to it: require "gollum/frontend/app" Precious::App.set(:gollum_path, File.dirname(__FILE__)) Precious::App.set(:wiki_options, {}) run Precious::App


5

Rails 3 counts as a rack application, so change the config to: RackEnv stage


5

You probably didn't compile SSL support when you installed Ruby. This could happen because you didn't have the libssl-dev or openssl packages installed first off. I recommend installing these packages and then re-compiling your Ruby version and trying again.


5

Your Apache is probably reaching the maximum open files limit. Apache will cause permission errors and it also explains why it takes a while and is resolved by reloading Apache. I'm not really familiarly with Mac's but there should be a command to check the open files of a process. (eg. lsof, pfiles, procfiles). Possible resolutions are: Increase the ...


4

One resource that I found useful was the section of the Passenger users guide where they talk about this: If one of your application instances is frozen (stopped responding), then you can figure out where it is frozen by killing it with SIGABRT. This will cause the application to raise an exception, with a backtrace.


4

From the mod_headers docs: The directives provided by mod_headers can occur almost anywhere within the server configuration. They are valid in the main server config and virtual host sections, inside , and sections, and within .htaccess files. If you want this to apply to the whole vhost, why put it inside <Location> tags? Just put the directives ...


4

We had this issue on our staging machine and it was related to a permission issue in nginx' proxy_temp-folder( /opt/nginx/proxy_temp in our case) Removing the folder and restarting nginx fixed the problem.


4

See following comment by Phusion CTO http://blog.phusion.nl/2010/06/18/the-road-to-passenger-3-technology-preview-2-stability-robustness-availability-self-healing/comment-page-1/#comment-22181


4

Have your favorite monitoring system monitor nginx's status or just spot-check it yourself for a snapshot of what's going on now.


4

This is due to some missing environment variables. Try to run this first: $ rvmsudo $SHELL # source /etc/apache2/envvars # export HOME=/home/USRNAME This script sets the missing variables (change USRNAME accordingly).


4

I'm not quite sure what your actual questions are. Your overall question is fairly vague. You have three main questions here from what I can gather: Where should I start to get my own scalable PaaS infrastructure? Is Passenger something I should even be considering? Is Docker something I should be considering? I'll answer number 3 first since that is ...


4

Application logs are as usual in log directory under application's root. In your case, full path is /home/mgimmo/public_html/immo/log/production.log Make sure that file is writable by web server user.


4

you can serve as many rails applications as you wish. If using apache httpd and passenger, here are the steps: Just symlink public folder of each of your rails application into apache's DocumentRoot as a subfolder. Then add a RailsBaseURI directive in your apache config that tells passenger that the given folder is a rails application. Lets say you have ...


3

Since you're mixing a ruby installation not coming from apt-get with a package of apt-get, issues will show, like you report. You can avoid that by installing Passenger gem gem install passenger and proceeding to install the apache module following Passenger instructions: http://www.modrails.com/install.html


3

In top, you can toggle the display of the full command by hitting the "c" key. If you're out of top, you can also get the full command using some ps options: ps -fp 26911 So, "f" for the full command, and "p" to specify the process ID you're interested in. You can also look at the proc filesystem on Linux. cat /proc/26911/cmdline will show the command ...


3

Placing an entry in your /etc/hosts will not cause other hosts in your network to know your computer as 'chipperapp.com', even with dynamic DNS. Dynamic DNS typically associates your local hostname with a DNS name inside of your DNS servers zonefile. That's likely not 'chipperapp.com'. You would need to either add 'chipperapp.com' to the /etc/hosts of the ...


3

This is intended behavior in Passenger. See here: A Rails application is started as the owner of the file config/environment.rb, and a Rack application is started as the owner of the file config.ru. So if /home/webapps/foo/config/environment.rb is owned by joe, then Phusion Passenger will launch the corresponding Rails application as joe as well. To ...


3

I am the Phusion Passenger author. You are misunderstanding something fundamentally about Nginx. First of all, Nginx does not support dynamically loadable modules. This means that the only way to extend Nginx, is by recompiling Nginx from scratch, with certain modules included. In your mental model, you seem to think that passenger-install-nginx-module ...


3

This is likely a problem with caching of the environments - by default in 3.7, data from an environment on the filesystem will be cached for 3 minutes, so changes are not visible to the agent nodes until that cache has expired. Adjust the master's environment_timeout to get the behavior you want, with the warning that going with 0 to avoid caching ...



Only top voted, non community-wiki answers of a minimum length are eligible