Skip to content

Instantly share code, notes, and snippets.

@benders
Created January 7, 2010 23:44
Show Gist options
  • Save benders/271727 to your computer and use it in GitHub Desktop.
Save benders/271727 to your computer and use it in GitHub Desktop.
LoadModule passenger_module <your-passenger-root-path>/ext/apache2/mod_passenger.so
PassengerRoot <your-passenger-root-path>
PassengerUseGlobalQueue on
PassengerMaxPoolSize 16
PassengerPoolIdleTime 0
PassengerMaxRequests 1000
PassengerRuby /usr/local/sbin/ree_wrapper
<VirtualHost *:80>
ServerName app.example.com
ServerAlias app app.*
UseCanonicalName On
DocumentRoot /srv/appuser/app/current/public
<Directory "/srv/appuser/app/current/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript application/json
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</VirtualHost>
#!/bin/sh
#
# Settings from Evan Weaver
# http://blog.evanweaver.com/articles/2009/04/09/ruby-gc-tuning/
#
RUBY_HEAP_MIN_SLOTS=500000
RUBY_HEAP_SLOTS_INCREMENT=250000
RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
RUBY_GC_MALLOC_LIMIT=50000000
export RUBY_HEAP_MIN_SLOTS RUBY_HEAP_SLOTS_INCREMENT RUBY_HEAP_SLOTS_GROWTH_FACTOR RUBY_GC_MALLOC_LIMIT
exec "/opt/ree/bin/ruby" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment