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 ...


9

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

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

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.


7

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

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

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

yum install libcurl-devel


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 ...


6

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.


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


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 ...


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

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.


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

I found a way to turn off HSTS from an answer on a Wordpress support forum of all of places: https://wordpress.org/support/topic/want-to-turn-off-http-strict-transport-security-hsts-header#post-6068192 You can send back a header that will turn off HSTS caching. Tested in Chrome with this example before_filter in a Rails 4 app: ...


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 ...


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

You used a fully qualified domain name in your SSL <VirtualHost>. <VirtualHost www.goodtogotraining.com:443> Apache recommends against this. A fully qualified domain name for the IP address of the virtual host (not recommended); To resolve the issue, use the IP address or * instead: <VirtualHost *:443>


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

You can verify the certificate/key pair manually using: openssl x509 -noout -modulus -in subdomain_domain_com.crt | openssl md5 openssl rsa -noout -modulus -in server.key | openssl md5 The output of the two commands should be the same. This will tell you that it's a valid pair. If it's valid, but you're getting that error, take a look at the section on ...


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 ...


3

You need to set 'daemon off'. launchctl assumes that processes it spawns don't daemonize, otherwise it cannot know when to restart a process. http://almosteffortless.com/2009/09/16/passenger-with-nginx-on-mac-os-x/


3

I would suggest to also read about the following directives, the use of which will give you extra flexibility in your setup: PassengerEnabled: allows to enable/disable passenger in a specific context (main server/virtualhost/directory), so that you can have areas that are served by another web application if needed. PassengerAppRoot: allows you to easily ...


3

As much as I'm a virtualisation junkie, if these Rails apps are all in the one "management domain" (ie you're responsible for keeping them all running, you're not hosting them for all manner of different developers who need to do their own thing now and then) I think that a single physical machine will work best. You'll probably be able to run all the sites ...



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