Thin: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
thin install | thin install | ||
update-rc.d -f thin defaults (to have thin restart on reboot) | update-rc.d -f thin defaults (to have thin restart on reboot) | ||
</pre> | |||
== Config File === | |||
put this into <code>/etc/thin/myapp.yml</code>: | |||
<pre> | |||
--- | |||
pid: tmp/pids/thin.pid | |||
address: 0.0.0.0 | |||
timeout: 30 | |||
wait: 30 | |||
port: 4810 | |||
log: log/thin.log | |||
max_conns: 1024 | |||
require: [] | |||
max_persistent_conns: 512 | |||
#environment: development | |||
environment: production | |||
servers: 4 | |||
daemonize: true | |||
chdir: /var/www/myapp | |||
</pre> | |||
== Use with Apache == | |||
Set up modules: | |||
<pre> | |||
a2enmod proxy | a2enmod proxy | ||
a2enmod proxy_balancer | a2enmod proxy_balancer |
Revision as of 22:43, 24 March 2011
http://code.macournoyer.com/thin/
Install
as root:
gem install thin thin install update-rc.d -f thin defaults (to have thin restart on reboot)
Config File =
put this into /etc/thin/myapp.yml
:
--- pid: tmp/pids/thin.pid address: 0.0.0.0 timeout: 30 wait: 30 port: 4810 log: log/thin.log max_conns: 1024 require: [] max_persistent_conns: 512 #environment: development environment: production servers: 4 daemonize: true chdir: /var/www/myapp
Use with Apache
Set up modules:
a2enmod proxy a2enmod proxy_balancer a2enmod proxy_http a2enmod rewrite