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

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


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

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

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

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.


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

Depending on your version of passenger, you should ether be able to do yes | passenger-install-nginx-module (for version 2.0.x) or passenger-install-nginx-module --auto for version >2.1 Source: http://groups.google.com/group/phusion-passenger/browse_thread/thread/7ef77828326daeee?pli=1


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

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


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


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


3

Got it. The answer was to combine the <Location> and <Directory> blocks and add a Satisfy directive: LoadModule auth_cas_module /usr/libexec/apache2/mod_auth_cas.so CASCookiePath /tmp/mod_auth_cas/ CASVersion 2 CASDebug on CASValidateServer off CASAllowWildcardCert on CASTimeout 86400 CASIdleTimeout 7200 LogLevel debug <VirtualHost *:80> ...


3

If something isn't running continually, then when it next starts it will read the new files. My crystal ball suggests you're actually referring to a Passenger instance; that is a daemon, but it's one that is "slaved" to Apache. If you restart Apache, that should do the trick, however Rails (and Passenger) is supposed to have some sort of auto-reloading ...


3

I like Nagios(http://www.nagios.org/) and Zabbix(http://www.zabbix.com/). Monit(http://mmonit.com/) can repair system. If you need graphics use Zabbix, if you need manage and repair use Monit, other use Nagios. If you do not need web managemnt and status, use nagios-plugins check_cpu and your favorite programming language.


3

In and of itself, using more than 200MB of RAM isn't necessarily an issue for your apache server. But I think that you just need to figure out what is acceptable for your setup. If there's nothing else on that VPS, I think it's safe to allow apache more than 200M as an upper limit. If you have the time and know-how, you can certainly find ways to bring ...


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



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