Add new website.
Older html is modified with redirect code to redirect to relevant part in newsite or docs. So, someone linking to us will still work.
@ -1,73 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/index.html#community">
|
||||
<title>Green Unicorn - Community</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="mailing-list">
|
||||
<h2><a class="toc-backref" href="#contents">Mailing list</a></h2>
|
||||
<p>The <strong>user</strong> mailing list is general discussion and support list for
|
||||
Gunicorn users.</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>To <strong>subscribe</strong>, send an email to <a class="reference external" href="mailto:user+subscribe@gunicorn.org">user+subscribe@gunicorn.org</a></li>
|
||||
<li>To <strong>unsubscribe</strong>, send an email to <a class="reference external" href="mailto:user+unsubscribe@gunicorn.org">user+unsubscribe@gunicorn.org</a></li>
|
||||
<li>Finally, to post a message to the list use the address to
|
||||
<a class="reference external" href="mailto:user@gunicorn.org">user@gunicorn.org</a></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p>The archive for this list can also be <a class="reference external" href="http://lists.gunicorn.org/user">browsed online</a> .</p>
|
||||
</div>
|
||||
<div class="section" id="irc">
|
||||
<h2><a class="toc-backref" href="#contents">Irc</a></h2>
|
||||
<p>The Gunicorn channel is on the <a class="reference external" href="http://freenode.net/">Freenode</a> IRC
|
||||
network. You can chat with other on <a class="reference external" href="http://webchat.freenode.net/?channels=gunicorn">#gunicorn channel</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="issue-tracking">
|
||||
<h2><a class="toc-backref" href="#contents">Issue Tracking</a></h2>
|
||||
<p>Bug reports, enhancement requests and tasks generally go in the <a class="reference external" href="http://github.com/benoitc/gunicorn/issues">Github
|
||||
issue tracker</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#mailing-list" id="id1">Mailing list</a></li>
|
||||
<li><a class="reference internal" href="#irc" id="id2">Irc</a></li>
|
||||
<li><a class="reference internal" href="#issue-tracking" id="id3">Issue Tracking</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/index.html#community">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="2;url=http://gunicorn.org/configure.html" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Configuration</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/configure.html">here</a>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,771 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Configure</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="overview">
|
||||
<h2><a class="toc-backref" href="#contents">Overview</a></h2>
|
||||
<p>Gunicorn pulls configuration information from three distinct places.</p>
|
||||
<p>The first place that Gunicorn will read configuration from is the framework
|
||||
specific configuration file. Currently this only affects Paster applications.</p>
|
||||
<p>The second source of configuration information is a configuration file that is
|
||||
optionally specified on the command line. Anything specified in the Gunicorn
|
||||
config file will override any framework specific settings.</p>
|
||||
<p>Lastly, the command line arguments used to invoke Gunicorn are the final place
|
||||
considered for configuration settings. If an option is specified on the command
|
||||
line, this is the value that will be used.</p>
|
||||
<dl class="docutils">
|
||||
<dt>Once again, in order of least to most authoritative:</dt>
|
||||
<dd><ol class="first last arabic simple">
|
||||
<li>Framework Settings</li>
|
||||
<li>Configuration File</li>
|
||||
<li>Command Line</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="framework-settings">
|
||||
<h2><a class="toc-backref" href="#contents">Framework Settings</a></h2>
|
||||
<p>Currently, only Paster applications have access to framework specific
|
||||
settings. If you have ideas for providing settings to WSGI applications or
|
||||
pulling information from Django's settings.py feel free to open an <a class="reference external" href="http://github.com/benoitc/gunicorn/issues">issue</a> to
|
||||
let us know.</p>
|
||||
<div class="section" id="paster-applications">
|
||||
<h3><a class="toc-backref" href="#contents">Paster Applications</a></h3>
|
||||
<p>In your INI file, you can specify to use Gunicorn as the server like such:</p>
|
||||
<pre class="literal-block">
|
||||
[server:main]
|
||||
use = egg:gunicorn#main
|
||||
host = 192.168.0.1
|
||||
port = 80
|
||||
workers = 2
|
||||
proc_name = brim
|
||||
</pre>
|
||||
<p>Any parameters that Gunicorn knows about will automatically be inserted into
|
||||
the base configuration. Remember that these will be overridden by the config
|
||||
file and/or the command line.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="configuration-file">
|
||||
<h2><a class="toc-backref" href="#contents">Configuration File</a></h2>
|
||||
<p>The configuration file should be a valid Python source file. It only needs to
|
||||
be readable from the file system. More specifically, it does not need to be
|
||||
importable. Any Python is valid. Just consider that this will be run every time
|
||||
you start Gunicorn (including when you signal Gunicorn to reload).</p>
|
||||
<p>To set a parameter, just assign to it. There's no special syntax. The values
|
||||
you provide will be used for the configuration values.</p>
|
||||
<p>For instance:</p>
|
||||
<pre class="literal-block">
|
||||
import multiprocessing
|
||||
|
||||
bind = "127.0.0.1:8000"
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
||||
</pre>
|
||||
<p>On a side note, Python's older than 2.6 can use sysconf to get the
|
||||
number of processors:</p>
|
||||
<pre class="literal-block">
|
||||
import os
|
||||
|
||||
def numCPUs():
|
||||
if not hasattr(os, "sysconf"):
|
||||
raise RuntimeError("No sysconf detected.")
|
||||
return os.sysconf("SC_NPROCESSORS_ONLN")
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="command-line">
|
||||
<h2><a class="toc-backref" href="#contents">Command Line</a></h2>
|
||||
<p>If an option is specified on the command line, it overrides all other values
|
||||
that may have been specified in the app specific settings, or in the optional
|
||||
configuration file. Not all Gunicorn settings are available to be set from the
|
||||
command line. To see the full list of command line settings you can do the
|
||||
usual:</p>
|
||||
<pre class="literal-block">
|
||||
$ gunicorn -h
|
||||
</pre>
|
||||
<p>There is also a <tt class="docutils literal"><span class="pre">--version</span></tt> flag available to the command line scripts that
|
||||
isn't mentioned in the list of settings.</p>
|
||||
</div>
|
||||
<div class="section" id="settings">
|
||||
<h2><a class="toc-backref" href="#contents">Settings</a></h2>
|
||||
<p>This is an exhaustive list of settings for Gunicorn. Some settings are only
|
||||
able to be set from a configuration file. The setting name is what should be
|
||||
used in the configuration file. The command line arguments are listed as well
|
||||
for reference on setting at the command line.</p>
|
||||
<div class="section" id="config-file">
|
||||
<h3><a class="toc-backref" href="#contents">Config File</a></h3>
|
||||
<div class="section" id="config">
|
||||
<h4><a class="toc-backref" href="#contents">config</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-c</span> FILE, <span class="pre">--config</span> FILE</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>The path to a Gunicorn config file.</p>
|
||||
<p>Only has an effect when specified on the command line or as part of an
|
||||
application specific configuration.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-socket">
|
||||
<h3><a class="toc-backref" href="#contents">Server Socket</a></h3>
|
||||
<div class="section" id="bind">
|
||||
<h4><a class="toc-backref" href="#contents">bind</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-b</span> ADDRESS, <span class="pre">--bind</span> ADDRESS</tt></li>
|
||||
<li><tt class="docutils literal">127.0.0.1:8000</tt></li>
|
||||
</ul>
|
||||
<p>The socket to bind.</p>
|
||||
<p>A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'. An IP is a valid
|
||||
HOST.</p>
|
||||
</div>
|
||||
<div class="section" id="backlog">
|
||||
<h4><a class="toc-backref" href="#contents">backlog</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--backlog</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">2048</tt></li>
|
||||
</ul>
|
||||
<p>The maximum number of pending connections.</p>
|
||||
<p>This refers to the number of clients that can be waiting to be served.
|
||||
Exceeding this number results in the client getting an error when
|
||||
attempting to connect. It should only affect servers under significant
|
||||
load.</p>
|
||||
<p>Must be a positive integer. Generally set in the 64-2048 range.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="worker-processes">
|
||||
<h3><a class="toc-backref" href="#contents">Worker Processes</a></h3>
|
||||
<div class="section" id="workers">
|
||||
<h4><a class="toc-backref" href="#contents">workers</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-w</span> INT, <span class="pre">--workers</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">1</tt></li>
|
||||
</ul>
|
||||
<p>The number of worker process for handling requests.</p>
|
||||
<p>A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
|
||||
want to vary this a bit to find the best for your particular
|
||||
application's work load.</p>
|
||||
</div>
|
||||
<div class="section" id="worker-class">
|
||||
<h4><a class="toc-backref" href="#contents">worker_class</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-k</span> STRING, <span class="pre">--worker-class</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal">sync</tt></li>
|
||||
</ul>
|
||||
<p>The type of workers to use.</p>
|
||||
<p>The default class (sync) should handle most 'normal' types of workloads.
|
||||
You'll want to read <a class="reference external" href="http://gunicorn.org/design.html">http://gunicorn.org/design.html</a> for information on
|
||||
when you might want to choose one of the other worker classes.</p>
|
||||
<p>A string referring to one of the following bundled classes:</p>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal">sync</tt></li>
|
||||
<li><tt class="docutils literal">eventlet</tt> - Requires eventlet >= 0.9.7</li>
|
||||
<li><tt class="docutils literal">gevent</tt> - Requires gevent >= 0.12.2 (?)</li>
|
||||
<li><tt class="docutils literal">tornado</tt> - Requires tornado >= 0.2</li>
|
||||
</ul>
|
||||
<p>Optionally, you can provide your own worker by giving gunicorn a
|
||||
python path to a subclass of gunicorn.workers.base.Worker. This
|
||||
alternative syntax will load the gevent class:
|
||||
<tt class="docutils literal">gunicorn.workers.ggevent.GeventWorker</tt>. Alternatively the syntax
|
||||
can also load the gevent class with <tt class="docutils literal">egg:gunicorn#gevent</tt></p>
|
||||
</div>
|
||||
<div class="section" id="worker-connections">
|
||||
<h4><a class="toc-backref" href="#contents">worker_connections</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--worker-connections</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">1000</tt></li>
|
||||
</ul>
|
||||
<p>The maximum number of simultaneous clients.</p>
|
||||
<p>This setting only affects the Eventlet and Gevent worker types.</p>
|
||||
</div>
|
||||
<div class="section" id="max-requests">
|
||||
<h4><a class="toc-backref" href="#contents">max_requests</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--max-requests</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">0</tt></li>
|
||||
</ul>
|
||||
<p>The maximum number of requests a worker will process before restarting.</p>
|
||||
<p>Any value greater than zero will limit the number of requests a work
|
||||
will process before automatically restarting. This is a simple method
|
||||
to help limit the damage of memory leaks.</p>
|
||||
<p>If this is set to zero (the default) then the automatic worker
|
||||
restarts are disabled.</p>
|
||||
</div>
|
||||
<div class="section" id="timeout">
|
||||
<h4><a class="toc-backref" href="#contents">timeout</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-t</span> INT, <span class="pre">--timeout</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">30</tt></li>
|
||||
</ul>
|
||||
<p>Workers silent for more than this many seconds are killed and restarted.</p>
|
||||
<p>Generally set to thirty seconds. Only set this noticeably higher if
|
||||
you're sure of the repercussions for sync workers. For the non sync
|
||||
workers it just means that the worker process is still communicating and
|
||||
is not tied to the length of time required to handle a single request.</p>
|
||||
</div>
|
||||
<div class="section" id="graceful-timeout">
|
||||
<h4><a class="toc-backref" href="#contents">graceful_timeout</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--graceful-timeout</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">30</tt></li>
|
||||
</ul>
|
||||
<p>Timeout for graceful workers restart.</p>
|
||||
<p>Generally set to thirty seconds. How max time worker can handle
|
||||
request after got restart signal. If the time is up worker will
|
||||
be force killed.</p>
|
||||
</div>
|
||||
<div class="section" id="keepalive">
|
||||
<h4><a class="toc-backref" href="#contents">keepalive</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--keep-alive</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">2</tt></li>
|
||||
</ul>
|
||||
<p>The number of seconds to wait for requests on a Keep-Alive connection.</p>
|
||||
<p>Generally set in the 1-5 seconds range.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="security">
|
||||
<h3><a class="toc-backref" href="#contents">Security</a></h3>
|
||||
<div class="section" id="limit-request-line">
|
||||
<h4><a class="toc-backref" href="#contents">limit_request_line</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--limit-request-line</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">4094</tt></li>
|
||||
</ul>
|
||||
<p>The maximum size of HTTP request line in bytes.</p>
|
||||
<p>This parameter is used to limit the allowed size of a client's
|
||||
HTTP request-line. Since the request-line consists of the HTTP
|
||||
method, URI, and protocol version, this directive places a
|
||||
restriction on the length of a request-URI allowed for a request
|
||||
on the server. A server needs this value to be large enough to
|
||||
hold any of its resource names, including any information that
|
||||
might be passed in the query part of a GET request. Value is a number
|
||||
from 0 (unlimited) to 8190.</p>
|
||||
<p>This parameter can be used to prevent any DDOS attack.</p>
|
||||
</div>
|
||||
<div class="section" id="limit-request-fields">
|
||||
<h4><a class="toc-backref" href="#contents">limit_request_fields</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--limit-request-fields</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">100</tt></li>
|
||||
</ul>
|
||||
<p>Limit the number of HTTP headers fields in a request.</p>
|
||||
<p>This parameter is used to limit the number of headers in a request to
|
||||
prevent DDOS attack. Used with the <cite>limit_request_field_size</cite> it allows
|
||||
more safety. By default this value is 100 and can't be larger than
|
||||
32768.</p>
|
||||
</div>
|
||||
<div class="section" id="limit-request-field-size">
|
||||
<h4><a class="toc-backref" href="#contents">limit_request_field_size</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--limit-request-field_size</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">8190</tt></li>
|
||||
</ul>
|
||||
<p>Limit the allowed size of an HTTP request header field.</p>
|
||||
<p>Value is a number from 0 (unlimited) to 8190. to set the limit
|
||||
on the allowed size of an HTTP request header field.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="debugging">
|
||||
<h3><a class="toc-backref" href="#contents">Debugging</a></h3>
|
||||
<div class="section" id="debug">
|
||||
<h4><a class="toc-backref" href="#contents">debug</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--debug</span></tt></li>
|
||||
<li><tt class="docutils literal">False</tt></li>
|
||||
</ul>
|
||||
<p>Turn on debugging in the server.</p>
|
||||
<p>This limits the number of worker processes to 1 and changes some error
|
||||
handling that's sent to clients.</p>
|
||||
</div>
|
||||
<div class="section" id="spew">
|
||||
<h4><a class="toc-backref" href="#contents">spew</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--spew</span></tt></li>
|
||||
<li><tt class="docutils literal">False</tt></li>
|
||||
</ul>
|
||||
<p>Install a trace function that spews every line executed by the server.</p>
|
||||
<p>This is the nuclear option.</p>
|
||||
</div>
|
||||
<div class="section" id="check-config">
|
||||
<h4><a class="toc-backref" href="#contents">check_config</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--check-config</span></tt></li>
|
||||
<li><tt class="docutils literal">False</tt></li>
|
||||
</ul>
|
||||
<p>Check the configuration..</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-mechanics">
|
||||
<h3><a class="toc-backref" href="#contents">Server Mechanics</a></h3>
|
||||
<div class="section" id="preload-app">
|
||||
<h4><a class="toc-backref" href="#contents">preload_app</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--preload</span></tt></li>
|
||||
<li><tt class="docutils literal">False</tt></li>
|
||||
</ul>
|
||||
<p>Load application code before the worker processes are forked.</p>
|
||||
<p>By preloading an application you can save some RAM resources as well as
|
||||
speed up server boot times. Although, if you defer application loading
|
||||
to each worker process, you can reload your application code easily by
|
||||
restarting workers.</p>
|
||||
</div>
|
||||
<div class="section" id="daemon">
|
||||
<h4><a class="toc-backref" href="#contents">daemon</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-D,</span> <span class="pre">--daemon</span></tt></li>
|
||||
<li><tt class="docutils literal">False</tt></li>
|
||||
</ul>
|
||||
<p>Daemonize the Gunicorn process.</p>
|
||||
<p>Detaches the server from the controlling terminal and enters the
|
||||
background.</p>
|
||||
</div>
|
||||
<div class="section" id="pidfile">
|
||||
<h4><a class="toc-backref" href="#contents">pidfile</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-p</span> FILE, <span class="pre">--pid</span> FILE</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>A filename to use for the PID file.</p>
|
||||
<p>If not set, no PID file will be written.</p>
|
||||
</div>
|
||||
<div class="section" id="user">
|
||||
<h4><a class="toc-backref" href="#contents">user</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-u</span> USER, <span class="pre">--user</span> USER</tt></li>
|
||||
<li><tt class="docutils literal">1000</tt></li>
|
||||
</ul>
|
||||
<p>Switch worker processes to run as this user.</p>
|
||||
<p>A valid user id (as an integer) or the name of a user that can be
|
||||
retrieved with a call to pwd.getpwnam(value) or None to not change
|
||||
the worker process user.</p>
|
||||
</div>
|
||||
<div class="section" id="group">
|
||||
<h4><a class="toc-backref" href="#contents">group</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-g</span> GROUP, <span class="pre">--group</span> GROUP</tt></li>
|
||||
<li><tt class="docutils literal">1000</tt></li>
|
||||
</ul>
|
||||
<p>Switch worker process to run as this group.</p>
|
||||
<p>A valid group id (as an integer) or the name of a user that can be
|
||||
retrieved with a call to pwd.getgrnam(value) or None to not change
|
||||
the worker processes group.</p>
|
||||
</div>
|
||||
<div class="section" id="umask">
|
||||
<h4><a class="toc-backref" href="#contents">umask</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-m</span> INT, <span class="pre">--umask</span> INT</tt></li>
|
||||
<li><tt class="docutils literal">0</tt></li>
|
||||
</ul>
|
||||
<p>A bit mask for the file mode on files written by Gunicorn.</p>
|
||||
<p>Note that this affects unix socket permissions.</p>
|
||||
<p>A valid value for the os.umask(mode) call or a string compatible with
|
||||
int(value, 0) (0 means Python guesses the base, so values like "0",
|
||||
"0xFF", "0022" are valid for decimal, hex, and octal representations)</p>
|
||||
</div>
|
||||
<div class="section" id="tmp-upload-dir">
|
||||
<h4><a class="toc-backref" href="#contents">tmp_upload_dir</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>Directory to store temporary request data as they are read.</p>
|
||||
<p>This may disappear in the near future.</p>
|
||||
<p>This path should be writable by the process permissions set for Gunicorn
|
||||
workers. If not specified, Gunicorn will choose a system generated
|
||||
temporary directory.</p>
|
||||
</div>
|
||||
<div class="section" id="secure-scheme-headers">
|
||||
<h4><a class="toc-backref" href="#contents">secure_scheme_headers</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">{'X-FORWARDED-PROTOCOL':</span> 'ssl', <span class="pre">'X-FORWARDED-SSL':</span> 'on'}</tt></li>
|
||||
</ul>
|
||||
<p>A dictionary containing headers and values that the front-end proxy
|
||||
uses to indicate HTTPS requests. These tell gunicorn to set
|
||||
wsgi.url_scheme to "https", so your application can tell that the
|
||||
request is secure.</p>
|
||||
<p>The dictionary should map upper-case header names to exact string
|
||||
values. The value comparisons are case-sensitive, unlike the header
|
||||
names, so make sure they're exactly what your front-end proxy sends
|
||||
when handling HTTPS requests.</p>
|
||||
<p>It is important that your front-end proxy configuration ensures that
|
||||
the headers defined here can not be passed directly from the client.</p>
|
||||
</div>
|
||||
<div class="section" id="x-forwarded-for-header">
|
||||
<h4><a class="toc-backref" href="#contents">x_forwarded_for_header</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">X-FORWARDED-FOR</span></tt></li>
|
||||
</ul>
|
||||
<p>Set the X-Forwarded-For header that identify the originating IP
|
||||
address of the client connection to gunicorn via a proxy.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="logging">
|
||||
<h3><a class="toc-backref" href="#contents">Logging</a></h3>
|
||||
<div class="section" id="accesslog">
|
||||
<h4><a class="toc-backref" href="#contents">accesslog</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--access-logfile</span> FILE</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>The Access log file to write to.</p>
|
||||
<p>"-" means log to stderr.</p>
|
||||
</div>
|
||||
<div class="section" id="access-log-format">
|
||||
<h4><a class="toc-backref" href="#contents">access_log_format</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--access-logformat</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">"%(h)s</span> %(l)s %(u)s %(t)s <span class="pre">"%(r)s"</span> %(s)s %(b)s <span class="pre">"%(f)s"</span> <span class="pre">"%(a)s"</span></tt></li>
|
||||
</ul>
|
||||
<p>The Access log format .</p>
|
||||
<p>By default:</p>
|
||||
<p>%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"</p>
|
||||
<p>h: remote address
|
||||
l: '-'
|
||||
u: currently '-', may be user name in future releases
|
||||
t: date of the request
|
||||
r: status line (ex: GET / HTTP/1.1)
|
||||
s: status
|
||||
b: response length or '-'
|
||||
f: referer
|
||||
a: user agent
|
||||
T: request time in seconds
|
||||
D: request time in microseconds,
|
||||
p: process ID
|
||||
{Header}i: request header
|
||||
{Header}o: response header</p>
|
||||
</div>
|
||||
<div class="section" id="errorlog">
|
||||
<h4><a class="toc-backref" href="#contents">errorlog</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--error-logfile</span> FILE, <span class="pre">--log-file</span> FILE</tt></li>
|
||||
<li><tt class="docutils literal">-</tt></li>
|
||||
</ul>
|
||||
<p>The Error log file to write to.</p>
|
||||
<p>"-" means log to stderr.</p>
|
||||
</div>
|
||||
<div class="section" id="loglevel">
|
||||
<h4><a class="toc-backref" href="#contents">loglevel</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--log-level</span> LEVEL</tt></li>
|
||||
<li><tt class="docutils literal">info</tt></li>
|
||||
</ul>
|
||||
<p>The granularity of Error log outputs.</p>
|
||||
<p>Valid level names are:</p>
|
||||
<ul class="simple">
|
||||
<li>debug</li>
|
||||
<li>info</li>
|
||||
<li>warning</li>
|
||||
<li>error</li>
|
||||
<li>critical</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="logger-class">
|
||||
<h4><a class="toc-backref" href="#contents">logger_class</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--logger-class</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal">simple</tt></li>
|
||||
</ul>
|
||||
<p>The logger you want to use to log events in gunicorn.</p>
|
||||
<p>The default class (<tt class="docutils literal">gunicorn.glogging.Logger</tt>) handle most of
|
||||
normal usages in logging. It provides error and access logging.</p>
|
||||
<p>You can provide your own worker by giving gunicorn a
|
||||
python path to a subclass like gunicorn.glogging.Logger.
|
||||
Alternatively the syntax can also load the Logger class
|
||||
with <cite>egg:gunicorn#simple</cite></p>
|
||||
</div>
|
||||
<div class="section" id="logconfig">
|
||||
<h4><a class="toc-backref" href="#contents">logconfig</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--log-config</span> FILE</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>The log config file to use.
|
||||
Gunicorn uses the standard Python logging module's Configuration
|
||||
file format.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="process-naming">
|
||||
<h3><a class="toc-backref" href="#contents">Process Naming</a></h3>
|
||||
<div class="section" id="proc-name">
|
||||
<h4><a class="toc-backref" href="#contents">proc_name</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">-n</span> STRING, <span class="pre">--name</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>A base to use with setproctitle for process naming.</p>
|
||||
<p>This affects things like <tt class="docutils literal">ps</tt> and <tt class="docutils literal">top</tt>. If you're going to be
|
||||
running more than one instance of Gunicorn you'll probably want to set a
|
||||
name to tell them apart. This requires that you install the setproctitle
|
||||
module.</p>
|
||||
<p>It defaults to 'gunicorn'.</p>
|
||||
</div>
|
||||
<div class="section" id="default-proc-name">
|
||||
<h4><a class="toc-backref" href="#contents">default_proc_name</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal">gunicorn</tt></li>
|
||||
</ul>
|
||||
<p>Internal setting that is adjusted for each type of application.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="django">
|
||||
<h3><a class="toc-backref" href="#contents">Django</a></h3>
|
||||
<div class="section" id="django-settings">
|
||||
<h4><a class="toc-backref" href="#contents">django_settings</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--settings</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>The Python path to a Django settings module.</p>
|
||||
<p>e.g. 'myproject.settings.main'. If this isn't provided, the
|
||||
DJANGO_SETTINGS_MODULE environment variable will be used.</p>
|
||||
</div>
|
||||
<div class="section" id="pythonpath">
|
||||
<h4><a class="toc-backref" href="#contents">pythonpath</a></h4>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">--pythonpath</span> STRING</tt></li>
|
||||
<li><tt class="docutils literal">None</tt></li>
|
||||
</ul>
|
||||
<p>A directory to add to the Python path for Django.</p>
|
||||
<p>e.g.
|
||||
'/home/djangoprojects/myproject'.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-hooks">
|
||||
<h3><a class="toc-backref" href="#contents">Server Hooks</a></h3>
|
||||
<div class="section" id="on-starting">
|
||||
<h4><a class="toc-backref" href="#contents">on_starting</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def on_starting(server):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just before the master process is initialized.</p>
|
||||
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
|
||||
</div>
|
||||
<div class="section" id="on-reload">
|
||||
<h4><a class="toc-backref" href="#contents">on_reload</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def on_reload(server):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called to recycle workers during a reload via SIGHUP.</p>
|
||||
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
|
||||
</div>
|
||||
<div class="section" id="when-ready">
|
||||
<h4><a class="toc-backref" href="#contents">when_ready</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def when_ready(server):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just after the server is started.</p>
|
||||
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
|
||||
</div>
|
||||
<div class="section" id="pre-fork">
|
||||
<h4><a class="toc-backref" href="#contents">pre_fork</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def pre_fork(server, worker):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just before a worker is forked.</p>
|
||||
<p>The callable needs to accept two instance variables for the Arbiter and
|
||||
new Worker.</p>
|
||||
</div>
|
||||
<div class="section" id="post-fork">
|
||||
<h4><a class="toc-backref" href="#contents">post_fork</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def post_fork(server, worker):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just after a worker has been forked.</p>
|
||||
<p>The callable needs to accept two instance variables for the Arbiter and
|
||||
new Worker.</p>
|
||||
</div>
|
||||
<div class="section" id="pre-exec">
|
||||
<h4><a class="toc-backref" href="#contents">pre_exec</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def pre_exec(server):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just before a new master process is forked.</p>
|
||||
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
|
||||
</div>
|
||||
<div class="section" id="pre-request">
|
||||
<h4><a class="toc-backref" href="#contents">pre_request</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def pre_request(worker, req):
|
||||
worker.log.debug("%s %s" % (req.method, req.path))
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just before a worker processes the request.</p>
|
||||
<p>The callable needs to accept two instance variables for the Worker and
|
||||
the Request.</p>
|
||||
</div>
|
||||
<div class="section" id="post-request">
|
||||
<h4><a class="toc-backref" href="#contents">post_request</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def post_request(worker, req, environ):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called after a worker processes the request.</p>
|
||||
<p>The callable needs to accept two instance variables for the Worker and
|
||||
the Request.</p>
|
||||
</div>
|
||||
<div class="section" id="worker-exit">
|
||||
<h4><a class="toc-backref" href="#contents">worker_exit</a></h4>
|
||||
<ul>
|
||||
<li><pre class="first literal-block">
|
||||
def worker_exit(server, worker):
|
||||
pass
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Called just after a worker has been exited.</p>
|
||||
<p>The callable needs to accept two instance variables for the Arbiter and
|
||||
the just-exited Worker.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#overview" id="id1">Overview</a></li>
|
||||
<li><a class="reference internal" href="#framework-settings" id="id2">Framework Settings</a><ul>
|
||||
<li><a class="reference internal" href="#paster-applications" id="id3">Paster Applications</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#configuration-file" id="id4">Configuration File</a></li>
|
||||
<li><a class="reference internal" href="#command-line" id="id5">Command Line</a></li>
|
||||
<li><a class="reference internal" href="#settings" id="id6">Settings</a><ul>
|
||||
<li><a class="reference internal" href="#config-file" id="id7">Config File</a><ul>
|
||||
<li><a class="reference internal" href="#config" id="id8">config</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-socket" id="id9">Server Socket</a><ul>
|
||||
<li><a class="reference internal" href="#bind" id="id10">bind</a></li>
|
||||
<li><a class="reference internal" href="#backlog" id="id11">backlog</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#worker-processes" id="id12">Worker Processes</a><ul>
|
||||
<li><a class="reference internal" href="#workers" id="id13">workers</a></li>
|
||||
<li><a class="reference internal" href="#worker-class" id="id14">worker_class</a></li>
|
||||
<li><a class="reference internal" href="#worker-connections" id="id15">worker_connections</a></li>
|
||||
<li><a class="reference internal" href="#max-requests" id="id16">max_requests</a></li>
|
||||
<li><a class="reference internal" href="#timeout" id="id17">timeout</a></li>
|
||||
<li><a class="reference internal" href="#graceful-timeout" id="id18">graceful_timeout</a></li>
|
||||
<li><a class="reference internal" href="#keepalive" id="id19">keepalive</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#security" id="id20">Security</a><ul>
|
||||
<li><a class="reference internal" href="#limit-request-line" id="id21">limit_request_line</a></li>
|
||||
<li><a class="reference internal" href="#limit-request-fields" id="id22">limit_request_fields</a></li>
|
||||
<li><a class="reference internal" href="#limit-request-field-size" id="id23">limit_request_field_size</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#debugging" id="id24">Debugging</a><ul>
|
||||
<li><a class="reference internal" href="#debug" id="id25">debug</a></li>
|
||||
<li><a class="reference internal" href="#spew" id="id26">spew</a></li>
|
||||
<li><a class="reference internal" href="#check-config" id="id27">check_config</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-mechanics" id="id28">Server Mechanics</a><ul>
|
||||
<li><a class="reference internal" href="#preload-app" id="id29">preload_app</a></li>
|
||||
<li><a class="reference internal" href="#daemon" id="id30">daemon</a></li>
|
||||
<li><a class="reference internal" href="#pidfile" id="id31">pidfile</a></li>
|
||||
<li><a class="reference internal" href="#user" id="id32">user</a></li>
|
||||
<li><a class="reference internal" href="#group" id="id33">group</a></li>
|
||||
<li><a class="reference internal" href="#umask" id="id34">umask</a></li>
|
||||
<li><a class="reference internal" href="#tmp-upload-dir" id="id35">tmp_upload_dir</a></li>
|
||||
<li><a class="reference internal" href="#secure-scheme-headers" id="id36">secure_scheme_headers</a></li>
|
||||
<li><a class="reference internal" href="#x-forwarded-for-header" id="id37">x_forwarded_for_header</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#logging" id="id38">Logging</a><ul>
|
||||
<li><a class="reference internal" href="#accesslog" id="id39">accesslog</a></li>
|
||||
<li><a class="reference internal" href="#access-log-format" id="id40">access_log_format</a></li>
|
||||
<li><a class="reference internal" href="#errorlog" id="id41">errorlog</a></li>
|
||||
<li><a class="reference internal" href="#loglevel" id="id42">loglevel</a></li>
|
||||
<li><a class="reference internal" href="#logger-class" id="id43">logger_class</a></li>
|
||||
<li><a class="reference internal" href="#logconfig" id="id44">logconfig</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#process-naming" id="id45">Process Naming</a><ul>
|
||||
<li><a class="reference internal" href="#proc-name" id="id46">proc_name</a></li>
|
||||
<li><a class="reference internal" href="#default-proc-name" id="id47">default_proc_name</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#django" id="id48">Django</a><ul>
|
||||
<li><a class="reference internal" href="#django-settings" id="id49">django_settings</a></li>
|
||||
<li><a class="reference internal" href="#pythonpath" id="id50">pythonpath</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-hooks" id="id51">Server Hooks</a><ul>
|
||||
<li><a class="reference internal" href="#on-starting" id="id52">on_starting</a></li>
|
||||
<li><a class="reference internal" href="#on-reload" id="id53">on_reload</a></li>
|
||||
<li><a class="reference internal" href="#when-ready" id="id54">when_ready</a></li>
|
||||
<li><a class="reference internal" href="#pre-fork" id="id55">pre_fork</a></li>
|
||||
<li><a class="reference internal" href="#post-fork" id="id56">post_fork</a></li>
|
||||
<li><a class="reference internal" href="#pre-exec" id="id57">pre_exec</a></li>
|
||||
<li><a class="reference internal" href="#pre-request" id="id58">pre_request</a></li>
|
||||
<li><a class="reference internal" href="#post-request" id="id59">post_request</a></li>
|
||||
<li><a class="reference internal" href="#worker-exit" id="id60">worker_exit</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,253 +0,0 @@
|
||||
/* line 17, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* line 22, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* line 24, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* line 26, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/* line 28, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 30, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q, blockquote {
|
||||
quotes: none;
|
||||
}
|
||||
/* line 103, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q:before, q:after, blockquote:before, blockquote:after {
|
||||
content: "";
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* line 32, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* line 116, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* line 15, ../../css/index.sass */
|
||||
#container.landing {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 960px;
|
||||
}
|
||||
/* line 17, ../../css/index.sass */
|
||||
#container.landing #menu, #container.landing #header, #container.landing div.blurb, #container.landing #tutorial, #container.landing #actions, #container.landing #footer {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
/* line 19, ../../css/index.sass */
|
||||
#container.landing #menu, #container.landing #header, #container.landing #footer {
|
||||
width: 940px;
|
||||
}
|
||||
/* line 22, ../../css/index.sass */
|
||||
#container.landing div.blurb {
|
||||
width: 300px;
|
||||
}
|
||||
/* line 24, ../../css/index.sass */
|
||||
#container.landing #tutorial {
|
||||
width: 620px;
|
||||
}
|
||||
|
||||
/* line 4, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
body {
|
||||
font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
}
|
||||
|
||||
/* line 6, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
a:focus {
|
||||
outline: 1px dotted invert;
|
||||
}
|
||||
|
||||
/* line 8, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
hr {
|
||||
border-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 0;
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* line 14, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
/* line 16, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h2 {
|
||||
font-size: 23px;
|
||||
}
|
||||
|
||||
/* line 18, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h3 {
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
/* line 20, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h4 {
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
/* line 22, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h5 {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* line 24, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
/* line 26, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
/* line 28, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
ul {
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
/* line 30, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
li {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
/* line 32, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
p,
|
||||
dl,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
ol,
|
||||
ul,
|
||||
pre,
|
||||
table,
|
||||
address,
|
||||
fieldset {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* line 29, ../../css/index.sass */
|
||||
a, a:visited, a:hover, a:active {
|
||||
color: #569633;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 33, ../../css/index.sass */
|
||||
#header {
|
||||
margin: 46px 0px;
|
||||
}
|
||||
|
||||
/* line 36, ../../css/index.sass */
|
||||
#menu {
|
||||
margin-bottom: 23px;
|
||||
-moz-border-radius-bottomleft: 10px;
|
||||
-webkit-border-bottom-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
-moz-border-radius-bottomright: 10px;
|
||||
-webkit-border-bottom-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
background-color: #959595;
|
||||
text-align: right;
|
||||
}
|
||||
/* line 41, ../../css/index.sass */
|
||||
#menu div.logo {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
/* line 45, ../../css/index.sass */
|
||||
#menu ul {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
list-style: none;
|
||||
}
|
||||
/* line 11, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/typography/lists/_bullets.scss */
|
||||
#menu ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
/* line 49, ../../css/index.sass */
|
||||
#menu ul li {
|
||||
display: inline;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
/* line 52, ../../css/index.sass */
|
||||
#menu ul li a {
|
||||
font-size: 17px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* line 56, ../../css/index.sass */
|
||||
#footer {
|
||||
border-top: 1px solid #959595;
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
color: #959595;
|
||||
}
|
||||
/* line 61, ../../css/index.sass */
|
||||
#footer p {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* line 64, ../../css/index.sass */
|
||||
pre, tt, code {
|
||||
font-family: "Andale Mono", "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* line 68, ../../css/index.sass */
|
||||
pre {
|
||||
white-space: pre;
|
||||
background-color: black;
|
||||
color: lime;
|
||||
margin: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
@ -1,309 +1,392 @@
|
||||
/* line 17, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
html,body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,
|
||||
code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,
|
||||
dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,
|
||||
tbody,tfoot,thead,tr,th,td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
ol,ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* line 22, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
html {
|
||||
line-height: 1;
|
||||
overflow-y: scroll;
|
||||
font-size: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
/* line 24, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
a:hover, a:active, a:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* line 26, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
img {
|
||||
border: 0;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
/* line 28, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* line 30, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q, blockquote {
|
||||
quotes: none;
|
||||
}
|
||||
/* line 103, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
q:before, q:after, blockquote:before, blockquote:after {
|
||||
content: "";
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* line 32, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* line 116, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* line 15, ../../css/style.sass */
|
||||
#container.twocolumn {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 960px;
|
||||
}
|
||||
/* line 17, ../../css/style.sass */
|
||||
#container.twocolumn #header, #container.twocolumn #menu, #container.twocolumn #footer, #container.twocolumn #toc, #container.twocolumn #content {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
/* line 19, ../../css/style.sass */
|
||||
#container.twocolumn #header, #container.twocolumn #menu, #container.twocolumn #footer {
|
||||
width: 940px;
|
||||
}
|
||||
/* line 21, ../../css/style.sass */
|
||||
#container.twocolumn #toc {
|
||||
width: 300px;
|
||||
}
|
||||
/* line 23, ../../css/style.sass */
|
||||
#container.twocolumn #content {
|
||||
width: 620px;
|
||||
}
|
||||
|
||||
/* line 4, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
body {
|
||||
font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
|
||||
background: #F8F8F3;
|
||||
margin: 0;
|
||||
font: 14px/1.4 "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
||||
color: #67686B;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* line 6, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
a:focus {
|
||||
outline: 1px dotted invert;
|
||||
a,
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* line 8, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
hr {
|
||||
border-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 0;
|
||||
clear: both;
|
||||
height: 0;
|
||||
.clearall {
|
||||
clear: both;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* line 14, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
.logo-wrapper {
|
||||
border-bottom: 1px solid #2A8729;
|
||||
}
|
||||
|
||||
/* line 16, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h2 {
|
||||
font-size: 23px;
|
||||
.logo-div {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
/* line 18, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h3 {
|
||||
font-size: 21px;
|
||||
.logo {
|
||||
width: 250px;
|
||||
margin: 0 auto;
|
||||
height: 119px;
|
||||
background: url(../images/logo-bottom.png) no-repeat bottom center;
|
||||
position: relative;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
/* line 20, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h4 {
|
||||
font-size: 19px;
|
||||
.banner-wrapper {
|
||||
background: url(../images/banner-bg.jpg) repeat;
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 365px;
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
/* line 22, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h5 {
|
||||
font-size: 17px;
|
||||
.banner {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
/* line 24, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
h6 {
|
||||
font-size: 15px;
|
||||
.title {
|
||||
width: 250px;
|
||||
margin: 0 auto;
|
||||
margin-top: 32px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
/* line 26, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
ol {
|
||||
list-style: decimal;
|
||||
.banner h1 {
|
||||
font-size: 20px;
|
||||
font-weight: lighter;
|
||||
color: #FFF;
|
||||
margin: 15px 10px 0;
|
||||
padding: 5px 40px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
/* line 28, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
ul {
|
||||
list-style: square;
|
||||
.greenbutton {
|
||||
background: url(../images/greenbutton.jpg) repeat-x;
|
||||
height: 54px;
|
||||
width: 224px;
|
||||
line-height: 54px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: solid 1px #1D692D;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
letter-spacing: 1px;
|
||||
text-shadow: 1px 1px 1px #000;
|
||||
}
|
||||
|
||||
/* line 30, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
li {
|
||||
margin-left: 30px;
|
||||
.greenbutton:hover {
|
||||
background: url(../images/greenbutton.jpg) repeat-x bottom;
|
||||
}
|
||||
|
||||
/* line 32, /Library/Ruby/Gems/1.8/gems/compass-960-plugin-0.10.4/stylesheets/960/_text.sass */
|
||||
p,
|
||||
dl,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
ol,
|
||||
ul,
|
||||
pre,
|
||||
table,
|
||||
address,
|
||||
fieldset {
|
||||
margin-bottom: 20px;
|
||||
.redbutton {
|
||||
background: url(../images/redbutton.jpg) repeat-x;
|
||||
height: 54px;
|
||||
width: 224px;
|
||||
line-height: 54px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: solid 1px #7D180A;
|
||||
color: #fff;
|
||||
font-size: 22px;
|
||||
letter-spacing: 1px;
|
||||
text-shadow: 1px 1px 1px #000;
|
||||
}
|
||||
|
||||
/* line 30, ../../css/style.sass */
|
||||
body {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
.redbutton:hover {
|
||||
background: url(../images/redbutton.jpg) repeat-x bottom;
|
||||
}
|
||||
|
||||
/* line 33, ../../css/style.sass */
|
||||
a, a:visited, a:hover, a:active {
|
||||
color: #569633;
|
||||
text-decoration: none;
|
||||
.banner-button {
|
||||
width: 460px;
|
||||
margin: 0 auto;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/* line 39, ../../css/style.sass */
|
||||
#menu {
|
||||
margin-bottom: 23px;
|
||||
-moz-border-radius-bottomleft: 10px;
|
||||
-webkit-border-bottom-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
-moz-border-radius-bottomright: 10px;
|
||||
-webkit-border-bottom-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
background-color: #959595;
|
||||
text-align: right;
|
||||
}
|
||||
/* line 44, ../../css/style.sass */
|
||||
#menu div.logo {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
/* line 48, ../../css/style.sass */
|
||||
#menu ul {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
list-style: none;
|
||||
}
|
||||
/* line 11, /Library/Ruby/Gems/1.8/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/typography/lists/_bullets.scss */
|
||||
#menu ul li {
|
||||
list-style-image: none;
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
/* line 52, ../../css/style.sass */
|
||||
#menu ul li {
|
||||
display: inline;
|
||||
padding: 0px 3px;
|
||||
}
|
||||
/* line 55, ../../css/style.sass */
|
||||
#menu ul li a {
|
||||
font-size: 17px;
|
||||
color: white;
|
||||
.banner-link {
|
||||
width: 250px;
|
||||
margin: 0 auto;
|
||||
margin-top: 15px;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* line 59, ../../css/style.sass */
|
||||
div.document {
|
||||
border-right: 1px solid #959595;
|
||||
padding-right: 15px;
|
||||
.banner-link a {
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
/* line 64, ../../css/style.sass */
|
||||
#toc ul ul {
|
||||
list-style: disc;
|
||||
}
|
||||
/* line 66, ../../css/style.sass */
|
||||
#toc ul ul ul {
|
||||
list-style: circle;
|
||||
.banner-link a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* line 69, ../../css/style.sass */
|
||||
p.topic-title {
|
||||
display: none;
|
||||
.mid-wrapper {
|
||||
width: 100%;
|
||||
border-top: 1px solid #2A8729;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
/* line 72, ../../css/style.sass */
|
||||
pre, tt, code {
|
||||
font-family: "Andale Mono", "Lucida Console", monospace;
|
||||
font-size: 12px;
|
||||
.tabs {
|
||||
width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 3px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.tab-bar li {
|
||||
width: 230px;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.tab-bar li a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tab-bar li a:hover > p,
|
||||
.tab-bar li a:hover > h2 {
|
||||
color: #1D692D;
|
||||
}
|
||||
|
||||
.tab-bar li a p,
|
||||
.tab-bar li a h2 {
|
||||
color: #404028;
|
||||
margin-top: 8px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.tab-bar li a h2 {
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.withborder {
|
||||
background: url(../images/separator.jpg) no-repeat;
|
||||
}
|
||||
|
||||
.gabout, .gcommunity, .gdownloads, .gdocuments {
|
||||
height: 80px;
|
||||
width: 230px;
|
||||
padding-top: 118px;
|
||||
}
|
||||
|
||||
.gabout {
|
||||
background: url(../images/about.jpg) no-repeat 50% 0;
|
||||
}
|
||||
|
||||
.gcommunity {
|
||||
background: url(../images/community.jpg) no-repeat 50% 0;
|
||||
}
|
||||
|
||||
.gdocuments {
|
||||
background: url(../images/documents.jpg) no-repeat 50% 0;
|
||||
}
|
||||
|
||||
.gdownloads {
|
||||
background: url(../images/downloads.jpg) no-repeat 50% 0;
|
||||
}
|
||||
|
||||
.tabs li.active a,
|
||||
.gabout:hover,
|
||||
.gcommunity:hover,
|
||||
.gdocuments:hover,
|
||||
.gdownloads:hover {
|
||||
background-position: 50% -220px;
|
||||
}
|
||||
|
||||
.tabs div {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.tabs div.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tab-box {
|
||||
color: #3F3F27;
|
||||
border: 1px solid #DDDDD5;
|
||||
padding: 25px 35px;
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.tab-box h1 {
|
||||
font-size: 28px;
|
||||
color: #2A8729;
|
||||
}
|
||||
|
||||
.tab-box p {
|
||||
margin: 0 0 9px;
|
||||
}
|
||||
|
||||
.tab-box ul {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.tab-box li {
|
||||
list-style: disc;
|
||||
margin: 0 0 9px;
|
||||
}
|
||||
|
||||
.tab-box a {
|
||||
color: #3F3F27;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.tab-box a:hover {
|
||||
color: #1D692D;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
background: url(../images/arrow.png) no-repeat;
|
||||
position: absolute;
|
||||
left: 115px;
|
||||
top: -7px;
|
||||
height: 10px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
/* line 76, ../../css/style.sass */
|
||||
pre {
|
||||
white-space: pre;
|
||||
background-color: black;
|
||||
color: lime;
|
||||
margin: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding: 5px;
|
||||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
display: block;
|
||||
padding: 8.5px;
|
||||
margin: 0 0 9px;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
background-color: #EEFFCC;
|
||||
border-top: 1px solid #A9CC99;
|
||||
border-bottom: 1px solid #A9CC99;
|
||||
}
|
||||
|
||||
/* line 84, ../../css/style.sass */
|
||||
.note {
|
||||
border-top: 1px solid #569633;
|
||||
border-bottom: 1px solid #569633;
|
||||
padding: 0.6em 0.6em 0.6em 80px;
|
||||
margin-bottom: 2em;
|
||||
position: relative;
|
||||
}
|
||||
/* line 90, ../../css/style.sass */
|
||||
.note p.admonition-title:before {
|
||||
content: "!";
|
||||
font-size: 60px;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
font-family: helvetica, arial;
|
||||
}
|
||||
/* line 98, ../../css/style.sass */
|
||||
.note p.admonition-title {
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
margin-bottom: 4px;
|
||||
padding: 0;
|
||||
}
|
||||
/* line 103, ../../css/style.sass */
|
||||
.note p.last {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
.user-wrapper {
|
||||
background: url(../images/banner-bg.jpg) repeat;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
/* line 107, ../../css/style.sass */
|
||||
#footer {
|
||||
border-top: 1px solid #959595;
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
color: #959595;
|
||||
}
|
||||
/* line 112, ../../css/style.sass */
|
||||
#footer p {
|
||||
margin-bottom: 5px;
|
||||
.users {
|
||||
width: 1000px;
|
||||
padding: 20px 5px;
|
||||
margin: 0 auto;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* line 115, ../../css/style.sass */
|
||||
strong {
|
||||
font-weight: bold;
|
||||
.users h3 {
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.users h2 {
|
||||
font-size: 26px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.users .left-details {
|
||||
width: 120px;
|
||||
float: left;
|
||||
height: 66px;
|
||||
background: url(../images/footer-arrow.png) no-repeat top right;
|
||||
padding-right: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.users .company-logos {
|
||||
float: left;
|
||||
width: 820px;
|
||||
height: 70px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.users .company-logos a img {
|
||||
float: left;
|
||||
border: solid 1px #004000;
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.users .company-logos a:hover img {
|
||||
border: solid 1px #000;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #F8F8F3;
|
||||
display: block;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.footer .footer-wp {
|
||||
margin: 0 auto;
|
||||
padding: 15px 5px;
|
||||
width: 930px;
|
||||
background: url(../images/footer-logo.jpg) no-repeat 0 50%;
|
||||
padding-left: 70px;
|
||||
}
|
||||
|
||||
.footer-wp a {
|
||||
color: #3F3F27;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.footer-wp a:hover {
|
||||
color: #1D692D;
|
||||
}
|
||||
@ -1,220 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Green Unicorn - Deploy</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/index.html#deployment">
|
||||
<title>Green Unicorn - Deployment</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="nginx-configuration">
|
||||
<h2><a class="toc-backref" href="#contents">Nginx Configuration</a></h2>
|
||||
<p>Although there are many HTTP proxies available, we strongly advise that you
|
||||
use <a class="reference external" href="http://www.nginx.org">Nginx</a>. If you choose another proxy server you need to make sure that it
|
||||
buffers slow clients when you use default Gunicorn workers. Without this
|
||||
buffering Gunicorn will be easily susceptible to denial-of-service attacks.
|
||||
You can use <a class="reference external" href="http://ha.ckers.org/slowloris/">slowloris</a> to check if your proxy is behaving properly.</p>
|
||||
<p>An <a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf">example configuration</a> file for fast clients with <a class="reference external" href="http://www.nginx.org">Nginx</a>:</p>
|
||||
<pre class="literal-block">
|
||||
worker_processes 1;
|
||||
|
||||
user nobody nogroup;
|
||||
pid /tmp/nginx.pid;
|
||||
error_log /tmp/nginx.error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
accept_mutex off;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /tmp/nginx.access.log combined;
|
||||
sendfile on;
|
||||
|
||||
upstream app_server {
|
||||
server unix:/tmp/gunicorn.sock fail_timeout=0;
|
||||
# For a TCP configuration:
|
||||
# server 192.168.0.7:8000 fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
client_max_body_size 4G;
|
||||
server_name _;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
|
||||
location ^~ /static {
|
||||
# path for static files
|
||||
alias /path/to/app/current/public/static;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_pass http://app_server;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /500.html;
|
||||
location = /500.html {
|
||||
root /path/to/app/current/public;
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>If you want to be able to handle streaming request/responses or other fancy
|
||||
features like Comet, Long polling, or Web sockets, you need to turn off the
|
||||
proxy buffering. <strong>When you do this</strong> you must run with one of the async worker
|
||||
classes.</p>
|
||||
<p>To turn off buffering, you only need to add <tt class="docutils literal">proxy_buffering off;</tt> to your
|
||||
<tt class="docutils literal">location</tt> block:</p>
|
||||
<pre class="literal-block">
|
||||
...
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
proxy_pass http://app_server;
|
||||
break;
|
||||
}
|
||||
}
|
||||
...
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="using-virtualenv">
|
||||
<h2><a class="toc-backref" href="#contents">Using Virtualenv</a></h2>
|
||||
<p>To serve an app from a <a class="reference external" href="http://pypi.python.org/pypi/virtualenv">Virtualenv</a> it is generally easiest to just install
|
||||
Gunicorn directly into the Virtualenv. This will create a set of Gunicorn
|
||||
scripts for that Virtualenv which can be used to run applications normally.</p>
|
||||
<p>If you have Virtualenv installed, you should be able to do something like
|
||||
this:</p>
|
||||
<pre class="literal-block">
|
||||
$ mkdir ~/venvs/
|
||||
$ virtualenv ~/venvs/webapp
|
||||
$ source ~/venvs/webapp/bin/activate
|
||||
$ ~/venvs/webapp/bin/easy_install -U gunicorn
|
||||
$ deactivate
|
||||
</pre>
|
||||
<p>Then you just need to use one of the three Gunicorn scripts that was installed
|
||||
into <tt class="docutils literal">~/venvs/webapp/bin</tt>.</p>
|
||||
<p>Note: You can force the installation of Gunicorn in your Virtualenv by
|
||||
passing <tt class="docutils literal"><span class="pre">-I</span></tt> or <tt class="docutils literal"><span class="pre">--ignore-installed</span></tt> option to pip:</p>
|
||||
<pre class="literal-block">
|
||||
$ source ~/venvs/webapp/bin/activate
|
||||
$ pip install -I gunicorn
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="monitoring">
|
||||
<h2><a class="toc-backref" href="#contents">Monitoring</a></h2>
|
||||
<div class="note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Make sure that when using either of these service monitors you do not
|
||||
enable the Gunicorn's daemon mode. These monitors expect that the process
|
||||
they launch will be the process they need to monior. Daemonizing
|
||||
will fork-exec which creates an unmonitored process and generally just
|
||||
confuses the monitor services.</p>
|
||||
</div>
|
||||
<div class="section" id="runit">
|
||||
<h3><a class="toc-backref" href="#contents">Runit</a></h3>
|
||||
<p>A popular method for deploying Gunicorn is to have it monitored by <a class="reference external" href="http://smarden.org/runit/">runit</a>.
|
||||
Here is an <a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/gunicorn_rc">example service</a> definition:</p>
|
||||
<pre class="literal-block">
|
||||
#!/bin/sh
|
||||
|
||||
GUNICORN=/usr/local/bin/gunicorn
|
||||
ROOT=/path/to/project
|
||||
PID=/var/run/gunicorn.pid
|
||||
|
||||
APP=main:application
|
||||
|
||||
if [ -f $PID ]; then rm $PID; fi
|
||||
|
||||
cd $ROOT
|
||||
exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP
|
||||
</pre>
|
||||
<p>Save this as <tt class="docutils literal"><span class="pre">/etc/sv/[app_name]/run</span></tt>, and make it executable
|
||||
(<tt class="docutils literal">chmod u+x <span class="pre">/etc/sv/[app_name]/run</span></tt>).
|
||||
Then run <tt class="docutils literal">ln <span class="pre">-s</span> <span class="pre">/etc/sv/[app_name]</span> <span class="pre">/etc/service/[app_name]</span></tt>.
|
||||
If runit is installed, gunicorn should start running automatically as soon
|
||||
as you create the symlink.</p>
|
||||
<p>If it doesn't start automatically, run the script directly to troubleshoot.</p>
|
||||
</div>
|
||||
<div class="section" id="supervisor">
|
||||
<h3><a class="toc-backref" href="#contents">Supervisor</a></h3>
|
||||
<p>Another useful tool to monitor and control Gunicorn is <a class="reference external" href="http://supervisord.org">Supervisor</a>. A
|
||||
<a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/supervisor.conf">simple configuration</a> is:</p>
|
||||
<pre class="literal-block">
|
||||
[program:gunicorn]
|
||||
command=/path/to/gunicorn main:application -c /path/to/gunicorn.conf.py
|
||||
directory=/path/to/project
|
||||
user=nobody
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=True
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="logging">
|
||||
<h2><a class="toc-backref" href="#contents">Logging</a></h2>
|
||||
<p>Logging can be configured by using various flags detailed in the
|
||||
<a class="reference external" href="http://gunicorn.org/configure.html#logging">configuration documentation</a> or by creating a <a class="reference external" href="https://github.com/benoitc/gunicorn/blob/master/examples/logging.conf">logging configuration file</a>.
|
||||
Send the <tt class="docutils literal">USR1</tt> signal to rotate logs if you are using the logrotate
|
||||
utility:</p>
|
||||
<pre class="literal-block">
|
||||
kill -USR1 $(cat /var/run/gunicorn.pid)
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#nginx-configuration" id="id4">Nginx Configuration</a></li>
|
||||
<li><a class="reference internal" href="#using-virtualenv" id="id5">Using Virtualenv</a></li>
|
||||
<li><a class="reference internal" href="#monitoring" id="id6">Monitoring</a><ul>
|
||||
<li><a class="reference internal" href="#circus" id="id7">Circus</a></li>
|
||||
<li><a class="reference internal" href="#runit" id="id8">Runit</a></li>
|
||||
<li><a class="reference internal" href="#supervisor" id="id9">Supervisor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#logging" id="id10">Logging</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/index.html#deployment">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="2;url=http://gunicorn.org/deploy.html" />
|
||||
<title>Green Unicorn - Deploy</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/index.html#deployment">
|
||||
<title>Green Unicorn - Deployment</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/deploy.html">here</a>
|
||||
Redirecting to <a href="http://gunicorn.org/index.html#deployment">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@ -1,133 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Design</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="server-model">
|
||||
<h2><a class="toc-backref" href="#contents">Server Model</a></h2>
|
||||
<p>Gunicorn is based on the pre-fork worker model. This means that there is a
|
||||
central master process that manages a set of worker processes. The master
|
||||
never knows anything about individual clients. All requests and responses are
|
||||
handled completely by worker processes.</p>
|
||||
<div class="section" id="master">
|
||||
<h3><a class="toc-backref" href="#contents">Master</a></h3>
|
||||
<p>The master process is a simple loop that listens for various process signals
|
||||
and reacts accordingly. It manages the list of running workers by listening
|
||||
for signals like TTIN, TTOU, and CHLD. TTIN and TTOU tell the master to
|
||||
increase or decrease the number of running workers. CHLD indicates that a child
|
||||
process has terminated, in this case the master process automatically restarts
|
||||
the failed worker.</p>
|
||||
</div>
|
||||
<div class="section" id="sync-workers">
|
||||
<h3><a class="toc-backref" href="#contents">Sync Workers</a></h3>
|
||||
<p>The most basic and the default worker type is a synchronous worker class that
|
||||
handles a single request at a time. This model is the simplest to reason about
|
||||
as any errors will affect at most a single request. Though as we describe below
|
||||
only processing a single request at a time requires some assumptions about how
|
||||
applications are programmed.</p>
|
||||
</div>
|
||||
<div class="section" id="async-workers">
|
||||
<h3><a class="toc-backref" href="#contents">Async Workers</a></h3>
|
||||
<p>The asynchronous workers available are based on <a class="reference external" href="http://bitbucket.org/ambroff/greenlet">Greenlets</a> (via <a class="reference external" href="http://eventlet.net">Eventlet</a> and
|
||||
<a class="reference external" href="http://gevent.org">Gevent</a>). Greenlets are an implementation of cooperative multi-threading for
|
||||
Python. In general, an application should be able to make use of these worker
|
||||
classes with no changes.</p>
|
||||
</div>
|
||||
<div class="section" id="tornado-workers">
|
||||
<h3><a class="toc-backref" href="#contents">Tornado Workers</a></h3>
|
||||
<p>There's also a Tornado worker class. It can be used to write applications using
|
||||
the Tornado framework. Although the Tornado workers are capable of serving a
|
||||
WSGI application, this is not a recommended configuration.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="choosing-a-worker-type">
|
||||
<h2><a class="toc-backref" href="#contents">Choosing a Worker Type</a></h2>
|
||||
<p>The default synchronous workers assume that your application is resource bound
|
||||
in terms of CPU and network bandwidth. Generally this means that your
|
||||
application shouldn't do anything that takes an undefined amount of time. For
|
||||
instance, a request to the internet meets this criteria. At some point the
|
||||
external network will fail in such a way that clients will pile up on your
|
||||
servers.</p>
|
||||
<p>This resource bound assumption is why we require a buffering proxy in front of a
|
||||
default configuration Gunicorn. If you exposed synchronous workers to the
|
||||
internet, a DOS attack would be trivial by creating a load that trickles data to
|
||||
the servers. For the curious, <a class="reference external" href="http://ha.ckers.org/slowloris/">Slowloris</a> is an example of this type of load.</p>
|
||||
<p>Some examples of behavior requiring asynchronous workers:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Applications making long blocking calls (Ie, external web services)</li>
|
||||
<li>Serving requests directly to the internet</li>
|
||||
<li>Streaming requests and responses</li>
|
||||
<li>Long polling</li>
|
||||
<li>Web sockets</li>
|
||||
<li>Comet</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="section" id="how-many-workers">
|
||||
<h2><a class="toc-backref" href="#contents">How Many Workers?</a></h2>
|
||||
<p>DO NOT scale the number of workers to the number of clients you expect to have.
|
||||
Gunicorn should only need 4-12 worker processes to handle hundreds or thousands
|
||||
of requests per second.</p>
|
||||
<p>Gunicorn relies on the operating system to provide all of the load balancing
|
||||
when handling requests. Generally we recommend <tt class="docutils literal">(2 x $num_cores) + 1</tt> as the
|
||||
number of workers to start off with. While not overly scientific, the formula
|
||||
is based on the assumption that for a given core, one worker will be reading
|
||||
or writing from the socket while the other worker is processing a request.</p>
|
||||
<p>Obviously, your particular hardware and application are going to affect the
|
||||
optimal number of workers. Our recommendation is to start with the above guess
|
||||
and tune using TTIN and TTOU signals while the application is under load.</p>
|
||||
<p>Always remember, there is such a thing as too many workers. After a point your
|
||||
worker processes will start thrashing system resources decreasing the throughput
|
||||
of the entire system.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#server-model" id="id1">Server Model</a><ul>
|
||||
<li><a class="reference internal" href="#master" id="id2">Master</a></li>
|
||||
<li><a class="reference internal" href="#sync-workers" id="id3">Sync Workers</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#tornado-workers" id="id5">Tornado Workers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#choosing-a-worker-type" id="id6">Choosing a Worker Type</a></li>
|
||||
<li><a class="reference internal" href="#how-many-workers" id="id7">How Many Workers?</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,168 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - FAQ</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="wsgi-bits">
|
||||
<h2><a class="toc-backref" href="#contents">WSGI Bits</a></h2>
|
||||
<div class="section" id="how-do-i-set-script-name">
|
||||
<h3><a class="toc-backref" href="#contents">How do I set SCRIPT_NAME?</a></h3>
|
||||
<p>By default <tt class="docutils literal">SCRIPT_NAME</tt> is an empy string. The value could be set by
|
||||
setting <tt class="docutils literal">SCRIPT_NAME</tt> in the environment or as an HTTP header.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="server-stuff">
|
||||
<h2><a class="toc-backref" href="#contents">Server Stuff</a></h2>
|
||||
<div class="section" id="how-do-i-reload-my-application-in-gunicorn">
|
||||
<h3><a class="toc-backref" href="#contents">How do I reload my application in Gunicorn?</a></h3>
|
||||
<p>You can gracefully reload by sending HUP signal to gunicorn:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -HUP masterpid
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-might-i-test-a-proxy-configuration">
|
||||
<h3><a class="toc-backref" href="#contents">How might I test a proxy configuration?</a></h3>
|
||||
<p>The <a class="reference external" href="http://ha.ckers.org/slowloris/">Slowloris</a> script is a great way to test that your proxy is correctly
|
||||
buffering responses for the synchronous workers.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-name-processes">
|
||||
<h3><a class="toc-backref" href="#contents">How can I name processes?</a></h3>
|
||||
<p>If you install the Python package <a class="reference external" href="http://pypi.python.org/pypi/setproctitle">setproctitle</a> Gunicorn will set the process
|
||||
names to something a bit more meaningful. This will affect the output you see
|
||||
in tools like <tt class="docutils literal">ps</tt> and <tt class="docutils literal">top</tt>. This helps for distinguishing the master
|
||||
process as well as between masters when running more than one app on a single
|
||||
machine. See the <a class="reference external" href="/configure.html#proc-name">proc_name</a> setting for more information.</p>
|
||||
</div>
|
||||
<div class="section" id="gunicorn-fails-to-start-with-upstart">
|
||||
<h3><a class="toc-backref" href="#contents">Gunicorn fails to start with upstart</a></h3>
|
||||
<p>Make sure you run gunicorn with <tt class="docutils literal"><span class="pre">--daemon</span></tt> option.</p>
|
||||
</div>
|
||||
<div class="section" id="why-is-there-no-http-keep-alive">
|
||||
<h3><a class="toc-backref" href="#contents">Why is there no HTTP Keep-Alive?</a></h3>
|
||||
<p>The default Sync workers are designed to run behind Nginx which only uses
|
||||
HTTP/1.0 with its upstream servers. If you want to deploy Gunicorn to
|
||||
handle unbuffered requests (ie, serving requests directly from the internet)
|
||||
you should use one of the async workers.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="worker-processes">
|
||||
<h2><a class="toc-backref" href="#contents">Worker Processes</a></h2>
|
||||
<div class="section" id="how-do-i-know-which-type-of-worker-to-use">
|
||||
<h3><a class="toc-backref" href="#contents">How do I know which type of worker to use?</a></h3>
|
||||
<p>Read the <a class="reference external" href="/design.html">design</a> page for help on the various worker types.</p>
|
||||
</div>
|
||||
<div class="section" id="what-types-of-workers-are-there">
|
||||
<h3><a class="toc-backref" href="#contents">What types of workers are there?</a></h3>
|
||||
<p>Check out the configuration docs for <a class="reference external" href="/configure.html#worker-class">worker_class</a></p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-figure-out-the-best-number-of-worker-processes">
|
||||
<h3><a class="toc-backref" href="#contents">How can I figure out the best number of worker processes?</a></h3>
|
||||
<p>Here is our recommendation for tuning the <a class="reference external" href="/design.html#how-many-workers">number of workers</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-change-the-number-of-workers-dynamically">
|
||||
<h3><a class="toc-backref" href="#contents">How can I change the number of workers dynamically?</a></h3>
|
||||
<p>TTIN and TTOU signals can be sent to the master to increase or decrease
|
||||
the number of workers.</p>
|
||||
<p>To increase the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTIN $masterpid
|
||||
</pre>
|
||||
<p>To decrease the worker count by one:</p>
|
||||
<pre class="literal-block">
|
||||
$ kill -TTOU $masterpid
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="kernel-parameters">
|
||||
<h2><a class="toc-backref" href="#contents">Kernel Parameters</a></h2>
|
||||
<p>When dealing with large numbers of concurrent connections there are a handful of
|
||||
kernel parameters that you might need to adjust. Generally these should only
|
||||
affect sites with a very large concurrent load. These parameters are not
|
||||
specific to Gunicorn, they would apply to any sort of network server you may be
|
||||
running.</p>
|
||||
<p>These commands are for Linux. Your particular OS may have slightly different
|
||||
parameters.</p>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-number-of-file-descriptors">
|
||||
<h3><a class="toc-backref" href="#contents">How can I increase the maximum number of file descriptors?</a></h3>
|
||||
<p>One of the first settings that usually needs to be bumped is the maximum number
|
||||
of open file descriptors for a given process. For the confused out there,
|
||||
remember that Unices treat sockets as files.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo ulimit -n 2048
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="how-can-i-increase-the-maximum-socket-backlog">
|
||||
<h3><a class="toc-backref" href="#contents">How can I increase the maximum socket backlog?</a></h3>
|
||||
<p>Listening sockets have an associated queue of incoming connections that are
|
||||
waiting to be accepted. If you happen to have a stampede of clients that fill up
|
||||
this queue new connections will eventually start getting dropped.</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo sysctl -w net.core.somaxconn="2048"
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#wsgi-bits" id="id1">WSGI Bits</a><ul>
|
||||
<li><a class="reference internal" href="#how-do-i-set-script-name" id="id2">How do I set SCRIPT_NAME?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#server-stuff" id="id3">Server Stuff</a><ul>
|
||||
<li><a class="reference internal" href="#how-do-i-reload-my-application-in-gunicorn" id="id4">How do I reload my application in Gunicorn?</a></li>
|
||||
<li><a class="reference internal" href="#how-might-i-test-a-proxy-configuration" id="id5">How might I test a proxy configuration?</a></li>
|
||||
<li><a class="reference internal" href="#how-can-i-name-processes" id="id6">How can I name processes?</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-fails-to-start-with-upstart" id="id7">Gunicorn fails to start with upstart</a></li>
|
||||
<li><a class="reference internal" href="#why-is-there-no-http-keep-alive" id="id8">Why is there no HTTP Keep-Alive?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#worker-processes" id="id9">Worker Processes</a><ul>
|
||||
<li><a class="reference internal" href="#how-do-i-know-which-type-of-worker-to-use" id="id10">How do I know which type of worker to use?</a></li>
|
||||
<li><a class="reference internal" href="#what-types-of-workers-are-there" id="id11">What types of workers are there?</a></li>
|
||||
<li><a class="reference internal" href="#how-can-i-figure-out-the-best-number-of-worker-processes" id="id12">How can I figure out the best number of worker processes?</a></li>
|
||||
<li><a class="reference internal" href="#how-can-i-change-the-number-of-workers-dynamically" id="id13">How can I change the number of workers dynamically?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#kernel-parameters" id="id14">Kernel Parameters</a><ul>
|
||||
<li><a class="reference internal" href="#how-can-i-increase-the-maximum-number-of-file-descriptors" id="id15">How can I increase the maximum number of file descriptors?</a></li>
|
||||
<li><a class="reference internal" href="#how-can-i-increase-the-maximum-socket-backlog" id="id16">How can I increase the maximum socket backlog?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
BIN
docs/site/images/about.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/site/images/arrow.png
Normal file
|
After Width: | Height: | Size: 408 B |
BIN
docs/site/images/banner-bg.jpg
Normal file
|
After Width: | Height: | Size: 611 B |
BIN
docs/site/images/community.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/site/images/documents.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
docs/site/images/downloads.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docs/site/images/favicon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
docs/site/images/footer-arrow.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
docs/site/images/footer-logo.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
docs/site/images/greenbutton.jpg
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
docs/site/images/logo-bottom.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
docs/site/images/logo.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
docs/site/images/redbutton.jpg
Normal file
|
After Width: | Height: | Size: 577 B |
BIN
docs/site/images/separator.jpg
Normal file
|
After Width: | Height: | Size: 440 B |
BIN
docs/site/images/title.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/site/images/user1.jpg
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
@ -1,97 +1,186 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Green Unicorn - Welcome</title>
|
||||
<link rel="stylesheet" href="css/index.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="landing">
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="header">
|
||||
<img src="images/large_gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</div>
|
||||
<div id="tutorial">
|
||||
<h3>Quick Start</h3>
|
||||
<pre>
|
||||
$ sudo easy_install virtualenv
|
||||
$ mkdir ~/environments/
|
||||
$ virtualenv ~/environments/tutorial/
|
||||
$ cd ~/environments/tutorial/
|
||||
$ ls
|
||||
bin include lib
|
||||
$ source bin/activate
|
||||
(tutorial) $ ./bin/easy_install gunicorn
|
||||
(tutorial) $ mkdir myapp
|
||||
(tutorial) $ cd myapp/
|
||||
(tutorial) $ vi myapp.py
|
||||
(tutorial) $ cat myapp.py
|
||||
|
||||
def app(environ, start_response):
|
||||
data = "Hello, World!\n"
|
||||
start_response("200 OK", [
|
||||
("Content-Type", "text/plain"),
|
||||
("Content-Length", str(len(data)))
|
||||
])
|
||||
return iter([data])
|
||||
|
||||
(tutorial) $ ../bin/gunicorn -w 4 myapp:app
|
||||
2010-06-05 23:27:07 [16800] [INFO] Arbiter booted
|
||||
2010-06-05 23:27:07 [16800] [INFO] Listening at: http://127.0.0.1:8000
|
||||
2010-06-05 23:27:07 [16801] [INFO] Worker spawned (pid: 16801)
|
||||
2010-06-05 23:27:07 [16802] [INFO] Worker spawned (pid: 16802)
|
||||
2010-06-05 23:27:07 [16803] [INFO] Worker spawned (pid: 16803)
|
||||
2010-06-05 23:27:07 [16804] [INFO] Worker spawned (pid: 16804)
|
||||
</pre>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>About</h3>
|
||||
<p>
|
||||
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's
|
||||
a pre-fork worker model ported from Ruby's
|
||||
<a href="http://unicorn.bogomips.org/">Unicorn</a> project. The
|
||||
Gunicorn server is broadly compatible with various web frameworks,
|
||||
simply implemented, light on server resources, and fairly speedy.
|
||||
</p>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>Features</h3>
|
||||
<ul>
|
||||
<li>Natively supports WSGI, Django, and Paster</li>
|
||||
<li>Automatic worker process management</li>
|
||||
<li>Simple Python configuration</li>
|
||||
<li>Multiple worker configurations</li>
|
||||
<li>Various server hooks for extensibility</li>
|
||||
<li>Compatible with Python 2.x >= 2.5</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="blurb">
|
||||
<h3>Version 0.14.6 / 2012-07-26</h3>
|
||||
<ul>
|
||||
<li>fix gevent &amp; subproces</li>
|
||||
<li>fix request line length check</li>
|
||||
<li>fix keepalive = 0</li>
|
||||
<li>fix tornado worker</li>
|
||||
</ul>
|
||||
<br>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Gunicorn ‐ Python WSGI HTTP Server for UNIX</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
||||
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo-wrapper">
|
||||
<div class="logo-div">
|
||||
<div class="logo"><img src="images/logo.jpg" ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="banner-wrapper">
|
||||
<div class="banner">
|
||||
<div class="title"><img src="images/title.png"></div>
|
||||
<h1>Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork worker model ported from Ruby's Unicorn project. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy.</h1>
|
||||
<div class="banner-button">
|
||||
<a href="https://github.com/benoitc/gunicorn" title="View source at github" class="greenbutton">View source</a>
|
||||
<a href="http://pypi.python.org/pypi/gunicorn/" title="Download from PyPi" class="redbutton">Download</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
|
||||
<div class="mid-wrapper">
|
||||
<div class="tabs">
|
||||
<ul class="tab-bar">
|
||||
<li class="active">
|
||||
<a href="#quickstart" title="Quickstart" class="gabout">
|
||||
<h2>Quickstart</h2>
|
||||
<p>Quickstart guide to getting started with using Gunicorn.</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="withborder">
|
||||
<a href="#deployment" title="Deployment" class="gdownloads">
|
||||
<h2>Deployment</h2>
|
||||
<p>Learn how to deploy the Gunicorn server.</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="withborder">
|
||||
<a href="#community" title="Community" class="gcommunity">
|
||||
<h2>Community</h2>
|
||||
<p>Get in touch with the community.</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="withborder">
|
||||
<a href="#docs" title="Documentation" class="gdocuments">
|
||||
<h2>Documentation</h2>
|
||||
<p>Read documentation to learn more about the Gunicorn.</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearall active"></div>
|
||||
|
||||
<div class="tab-box active" data-tab="quickstart">
|
||||
<h1>Installation</h1>
|
||||
<p>
|
||||
Here's a quick rundown on how to get started with gunicorn. For more detail read the documentation.
|
||||
</p>
|
||||
<pre>
|
||||
$ sudo pip install virtualenv
|
||||
$ mkdir ~/environments/
|
||||
$ virtualenv ~/environments/tutorial/
|
||||
$ cd ~/environments/tutorial/
|
||||
$ ls
|
||||
bin include lib
|
||||
$ source bin/activate
|
||||
(tutorial) $ pip install gunicorn
|
||||
(tutorial) $ mkdir myapp
|
||||
(tutorial) $ cd myapp/
|
||||
(tutorial) $ vi myapp.py
|
||||
(tutorial) $ cat myapp.py
|
||||
|
||||
def app(environ, start_response):
|
||||
data = "Hello, World!\n"
|
||||
start_response("200 OK", [
|
||||
("Content-Type", "text/plain"),
|
||||
("Content-Length", str(len(data)))
|
||||
])
|
||||
return iter([data])
|
||||
|
||||
(tutorial) $ ../bin/gunicorn -w 4 myapp:app
|
||||
2010-06-05 23:27:07 [16800] [INFO] Arbiter booted
|
||||
2010-06-05 23:27:07 [16800] [INFO] Listening at: http://127.0.0.1:8000
|
||||
2010-06-05 23:27:07 [16801] [INFO] Worker spawned (pid: 16801)
|
||||
2010-06-05 23:27:07 [16802] [INFO] Worker spawned (pid: 16802)
|
||||
2010-06-05 23:27:07 [16803] [INFO] Worker spawned (pid: 16803)
|
||||
2010-06-05 23:27:07 [16804] [INFO] Worker spawned (pid: 16804)
|
||||
</pre>
|
||||
</div>
|
||||
<div class="tab-box" data-tab="deployment">
|
||||
<h1>Deployment</h1>
|
||||
<p>
|
||||
Gunicorn is wsgi http server. It is best to use Gunicorn behind HTTP proxy server. We strongly advise you to use <a href="http://www.nginx.org/">nginx</a>.
|
||||
</p>
|
||||
<p>Here's an example to help you get started with using nginx.</p>
|
||||
<pre>
|
||||
server {
|
||||
listen 80;
|
||||
server_name example.org;
|
||||
access_log /var/log/nginx/example.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>Nginx is set up as reverse proxy server to gunicorn server which is running at localhost port 8000.</p>
|
||||
<p>Read the full documentation at <a href="#">docs.gunicorn.org</a></p>
|
||||
</div>
|
||||
<div class="tab-box" data-tab="community">
|
||||
<h1>Mailing list</h1>
|
||||
<p>The user mailing list is general discussion and support list for
|
||||
Gunicorn users.</p>
|
||||
<ul>
|
||||
<li>
|
||||
To subscribe, send an email to <a href="mailto:user+subscribe@gunicorn.org">user+subscribe@gunicorn.org</a>
|
||||
</li>
|
||||
<li>
|
||||
To unsubscribe, send an email to <a href="mailto:user+unsubscribe@gunicorn.org">user+unsubscribe@gunicorn.org</a>
|
||||
</li>
|
||||
<li>
|
||||
Finally, to post a message to the list use the address to
|
||||
<a href="mailto:user@gunicorn.org">user@gunicorn.org</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The archive for this list can also be <a href="http://lists.gunicorn.org/user">browsed online</a>.</p>
|
||||
|
||||
<h1>Irc</h1>
|
||||
<p>The Gunicorn channel is on the <a href="http://freenode.net/">Freenode</a> IRC
|
||||
network. You can chat with other on <a href="http://webchat.freenode.net/?channels=gunicorn">#gunicorn channel</a>.</p>
|
||||
|
||||
<h1>Issue Tracking</h1>
|
||||
<p>Bug reports, enhancement requests and tasks generally go in the <a href="http://github.com/benoitc/gunicorn/issues">Github
|
||||
issue tracker</a>.</p>
|
||||
</div>
|
||||
<div class="tab-box" data-tab="docs">
|
||||
<h1>Documentation</h1>
|
||||
<p>You can read more comprehensive documentation at <a href="http://docs.gunicorn.org">docs.gunicorn.org</a>.</p>
|
||||
<p>The contents are:</p>
|
||||
<ul>
|
||||
<li><a href="#">Installation</a></li>
|
||||
<li><a href="#">Commands</a></li>
|
||||
<li><a href="#">Configuration</a></li>
|
||||
<li><a href="#">Deployment</a></li>
|
||||
<li><a href="#">Design</a></li>
|
||||
<li><a href="#">FAQ</a></li>
|
||||
<li><a href="#">Changelog</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="user-wrapper">
|
||||
<div class="users">
|
||||
<div class="left-details">
|
||||
<h3>Who is using</h3>
|
||||
<h2>Gunicorn</h2>
|
||||
</div>
|
||||
<div class="company-logos">
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
<a href="#"><img src="images/user1.jpg"></a>
|
||||
</div>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="footer">
|
||||
<div class="footer-wp">
|
||||
This open sourced site is hosted on GitHub. <br>
|
||||
<a href="http://github.com/benoitc/gunicorn/issues">Patches, suggestions, and comments are welcome.</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,218 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Install</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="requirements">
|
||||
<h2><a class="toc-backref" href="#contents">Requirements</a></h2>
|
||||
<ul class="simple">
|
||||
<li><strong>Python 2.x >= 2.5</strong> (Python 3.x will be supported soon)</li>
|
||||
<li>setuptools >= 0.6c6</li>
|
||||
<li>nosetests (for the test suite only)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="with-easy-install">
|
||||
<h2><a class="toc-backref" href="#contents">With easy_install</a></h2>
|
||||
<p>If you don't already have <tt class="docutils literal">easy_install</tt> available you'll want to download
|
||||
and run the <tt class="docutils literal">ez_setup.py</tt> script:</p>
|
||||
<pre class="literal-block">
|
||||
$ curl -O http://peak.telecommunity.com/dist/ez_setup.py
|
||||
$ sudo python ez_setup.py -U setuptools
|
||||
</pre>
|
||||
<p>To install or upgrade to the latest released version of Gunicorn:</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo easy_install -U gunicorn
|
||||
</pre>
|
||||
<div class="note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p>There is a limited support version of Gunicorn that is compatible
|
||||
with Python 2.4. This fork is managed by Randall Leeds and can be
|
||||
found <a class="reference external" href="http://github.com/tilgovi/gunicorn">here on github</a>. To install this version you must specify
|
||||
the full url to something like <tt class="docutils literal">pip</tt>. This hasn't been tested
|
||||
wtih <tt class="docutils literal">easy_install</tt> just yet:</p>
|
||||
<pre class="last literal-block">
|
||||
$ pip install -f http://github.com/tilgovi/gunicorn/tarball/py24 gunicorn
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="from-source">
|
||||
<h2><a class="toc-backref" href="#contents">From Source</a></h2>
|
||||
<p>You can install Gunicorn from source just as you would install any other
|
||||
Python package. Gunicorn uses setuptools which will automatically fetch all
|
||||
dependencies (including setuptools itself).</p>
|
||||
<p>You can download a tarball of the latest sources from <a class="reference external" href="http://github.com/benoitc/gunicorn/downloads">GitHub Downloads</a> or
|
||||
fetch them with <a class="reference external" href="http://git-scm.com/">git</a>:</p>
|
||||
<pre class="literal-block">
|
||||
# Using git:
|
||||
$ git clone git://github.com/benoitc/gunicorn.git
|
||||
$ cd gunicorn
|
||||
|
||||
# Or using a tarball:
|
||||
$ wget http://github.com/benoitc/gunicorn/tarball/master -o gunicorn.tar.gz
|
||||
$ tar -xvzf gunicorn.tar.gz
|
||||
$ cd gunicorn-$HASH/
|
||||
|
||||
# Install
|
||||
$ sudo python setup.py install
|
||||
</pre>
|
||||
<p>If you've cloned the git repository, its highly recommended that you use the
|
||||
<tt class="docutils literal">develop</tt> command which will allow you to use Gunicorn from the source
|
||||
directory. This will allow you to keep up to date with development on GitHub as
|
||||
well as make changes to the source:</p>
|
||||
<pre class="literal-block">
|
||||
$ python setup.py develop
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="async-workers">
|
||||
<h2><a class="toc-backref" href="#contents">Async Workers</a></h2>
|
||||
<p>You may also want to install <a class="reference external" href="http://eventlet.net">Eventlet</a> or <a class="reference external" href="http://gevent.org">Gevent</a> if you expect that your
|
||||
application code may need to pause for extended periods of time during request
|
||||
processing. Check out the <a class="reference external" href="design.html">design docs</a> for more information on when you'll
|
||||
want to consider one of the alternate worker types.</p>
|
||||
<pre class="literal-block">
|
||||
$ easy_install -U greenlet # Required for both
|
||||
$ easy_install -U eventlet # For eventlet workers
|
||||
$ easy_install -U gevent # For gevent workers
|
||||
</pre>
|
||||
<div class="note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p>If installing <tt class="docutils literal">greenlet</tt> fails you probably need to install
|
||||
the Python headers. These headers are available in most package
|
||||
managers. On Ubuntu the package name for <tt class="docutils literal"><span class="pre">apt-get</span></tt> is
|
||||
<tt class="docutils literal"><span class="pre">python-dev</span></tt>.</p>
|
||||
<p class="last"><a class="reference external" href="http://gevent.org">Gevent</a> also requires that <tt class="docutils literal">libevent</tt> 1.4.x or 2.0.4 is installed.
|
||||
This could be a more recent version than what is available in your
|
||||
package manager. If <a class="reference external" href="http://gevent.org">Gevent</a> fails to build even with <a class="reference external" href="http://monkey.org/~provos/libevent">libevent</a>
|
||||
installed, this is the most likely reason.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="debian-gnu-linux">
|
||||
<h2><a class="toc-backref" href="#contents">Debian GNU/Linux</a></h2>
|
||||
<p>If you are using Debian GNU/Linux and it is recommended that you use
|
||||
system packages to install Gunicorn except maybe when you want to use
|
||||
different versions of gunicorn with virtualenv. This has a number of
|
||||
advantages:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Zero-effort installation: Automatically starts multiple Gunicorn instances
|
||||
based on configurations defined in <tt class="docutils literal">/etc/gunicorn.d</tt>.</li>
|
||||
<li>Sensible default locations for logs (<tt class="docutils literal">/var/log/gunicorn</tt>). Logs
|
||||
can be automatically rotated and compressed using <tt class="docutils literal">logrotate</tt>.</li>
|
||||
<li>Improved security: Can easily run each Gunicorn instance with a dedicated
|
||||
UNIX user/group.</li>
|
||||
<li>Sensible upgrade path: Upgrades to newer versions result in less downtime,
|
||||
handle conflicting changes in configuration options, and can be quickly
|
||||
rolled back in case of incompatibility. The package can also be purged
|
||||
entirely from the system in seconds.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<div class="section" id="stable-squeeze">
|
||||
<h3><a class="toc-backref" href="#contents">Stable ("squeeze")</a></h3>
|
||||
<p>The version of Gunicorn in the <a class="reference external" href="http://www.debian.org/">Debian</a> "stable" distribution is 0.10.0 (July
|
||||
2010). It is not recommended that you use this version.</p>
|
||||
<p>However, you can use the most recent version by using <a class="reference external" href="http://backports.debian.org/">Debian Backports</a>.
|
||||
First, copy the following line to your <tt class="docutils literal">/etc/apt/sources.list</tt>:</p>
|
||||
<pre class="literal-block">
|
||||
deb http://backports.debian.org/debian-backports squeeze-backports main
|
||||
</pre>
|
||||
<p>Then, update your local package lists:</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo apt-get update
|
||||
</pre>
|
||||
<p>You can then install the latest version using:</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo apt-get -t squeeze-backports install gunicorn
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="testing-wheezy-unstable-sid">
|
||||
<h3><a class="toc-backref" href="#contents">Testing ("wheezy") / Unstable ("sid")</a></h3>
|
||||
<p>"wheezy" and "sid" contain the latest released version of Gunicorn. You can
|
||||
install it in the usual way:</p>
|
||||
<pre class="literal-block">
|
||||
$ sudo apt-get install gunicorn
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="ubuntu">
|
||||
<h2><a class="toc-backref" href="#contents">Ubuntu</a></h2>
|
||||
<p>If you use <a class="reference external" href="http://www.ubuntu.com/">Ubuntu</a>, you can update your system with packages from
|
||||
our <a class="reference external" href="https://launchpad.net/~bchesneau/+archive/gunicorn">PPA</a> by adding <tt class="docutils literal">ppa:gunicorn/ppa</tt> to your system's Software
|
||||
Sources. Use the <tt class="docutils literal"><span class="pre">apt-add-repository</span></tt> command from the
|
||||
<tt class="docutils literal"><span class="pre">python-software-properties</span></tt> package to add the Gunicorn software source.</p>
|
||||
<blockquote>
|
||||
$ sudo apt-add-repository ppa:gunicorn/ppa</blockquote>
|
||||
<p>Or this PPA can be added to your system manually by copying the lines below
|
||||
and adding them to your system's software sources:</p>
|
||||
<pre class="literal-block">
|
||||
deb http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main
|
||||
deb-src http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main
|
||||
</pre>
|
||||
<p>Replace 'lucid' with your Ubuntu distribution series.</p>
|
||||
<div class="section" id="signing-key">
|
||||
<h3><a class="toc-backref" href="#contents">Signing key</a></h3>
|
||||
<pre class="literal-block">
|
||||
1024R/5370FF2A
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="fingerprint">
|
||||
<h3><a class="toc-backref" href="#contents">Fingerprint</a></h3>
|
||||
<pre class="literal-block">
|
||||
FC7B41B54C9B8476D9EC22A2C6773E575370FF2A
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#requirements" id="id2">Requirements</a></li>
|
||||
<li><a class="reference internal" href="#with-easy-install" id="id3">With easy_install</a></li>
|
||||
<li><a class="reference internal" href="#from-source" id="id4">From Source</a></li>
|
||||
<li><a class="reference internal" href="#async-workers" id="id5">Async Workers</a></li>
|
||||
<li><a class="reference internal" href="#debian-gnu-linux" id="id6">Debian GNU/Linux</a><ul>
|
||||
<li><a class="reference internal" href="#stable-squeeze" id="id7">Stable ("squeeze")</a></li>
|
||||
<li><a class="reference internal" href="#testing-wheezy-unstable-sid" id="id8">Testing ("wheezy") / Unstable ("sid")</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#ubuntu" id="id9">Ubuntu</a><ul>
|
||||
<li><a class="reference internal" href="#signing-key" id="id10">Signing key</a></li>
|
||||
<li><a class="reference internal" href="#fingerprint" id="id11">Fingerprint</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="2;url=http://gunicorn.org/install.html" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Install</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/install.html">here</a>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
46
docs/site/js/main.js
Executable file
@ -0,0 +1,46 @@
|
||||
$(document).ready(function() {
|
||||
Tabs.init();
|
||||
});
|
||||
|
||||
var Tabs = {
|
||||
init: function(){
|
||||
var activateTab = function ($tab) {
|
||||
var // this links tabs set
|
||||
$tabs = $tab.parents('.tabs'),
|
||||
// currently active tab
|
||||
activeTab = {
|
||||
'tab' : $tabs.find('ul').children('li.active'),
|
||||
'content' : $tabs.find('div[data-tab].active')
|
||||
},
|
||||
// newly clicked tab
|
||||
newTab = {
|
||||
'tab' : $tab.parent('li'),
|
||||
'content' : $tabs.find('[data-tab=' + $tab.attr('href').replace('#', '') + ']')
|
||||
},
|
||||
x, y;
|
||||
|
||||
// remove active class from tab and content
|
||||
for (x in activeTab) {
|
||||
activeTab[x].removeClass('active');
|
||||
}
|
||||
|
||||
// add active class to tab and content
|
||||
for (y in newTab) {
|
||||
newTab[y].addClass('active');
|
||||
}
|
||||
};
|
||||
// hook up tab links
|
||||
$(document).on('click', '.tabs ul li a', function(e) {
|
||||
activateTab($(this));
|
||||
//alert($(this));
|
||||
});
|
||||
|
||||
// hook up initial load active tab
|
||||
if (window.location.hash) {
|
||||
var $activeTab = $('a[href="' + window.location.hash + '"]');
|
||||
if ($activeTab.length && $activeTab.parents('.tabs').length) {
|
||||
activateTab($activeTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1,459 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - News</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="id1">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.6 / 2012-07-26</a></h2>
|
||||
<ul class="simple">
|
||||
<li>fix gevent &amp; subproces</li>
|
||||
<li>fix request line length check</li>
|
||||
<li>fix keepalive = 0</li>
|
||||
<li>fix tornado worker</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.5 / 2012-06-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>fix logging during daemonisation</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id3">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.4 / 2012-06-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>new --graceful-timeout option</li>
|
||||
<li>fix multiple issues with request limit</li>
|
||||
<li>more fixes in django settings resolutions</li>
|
||||
<li>fix gevent.core import</li>
|
||||
<li>fix keepalive=0 in eventlet worker</li>
|
||||
<li>fix handle_error display with the unix worker</li>
|
||||
<li>fix tornado.wsgi.WSGIApplication calling error</li>
|
||||
<li><strong>breaking change</strong>: take the control on graceful reload back.
|
||||
graceful can't be overrided anymore using the on_reload function.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id4">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.3 / 2012-05-15</a></h2>
|
||||
<ul class="simple">
|
||||
<li>improvement: performance of http.body.Body.readline()</li>
|
||||
<li>improvement: log HTTP errors in access log like Apache</li>
|
||||
<li>improvment: display traceback when the worker fails to boot</li>
|
||||
<li>improvement: makes gunicorn work with gevent 1.0</li>
|
||||
<li>examples: websocket example now supports hybi13</li>
|
||||
<li>fix: reopen log files after initialization</li>
|
||||
<li>fix: websockets support</li>
|
||||
<li>fix: django1.4 support</li>
|
||||
<li>fix: only load the paster application 1 time</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id5">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.2 / 2012-03-16</a></h2>
|
||||
<ul class="simple">
|
||||
<li>add validate_class validator: allows to use a class or a method to
|
||||
initialize the app during in-code configuration</li>
|
||||
<li>add support for max_requests in tornado worker</li>
|
||||
<li>add support for disabling x_forwarded_for_header in tornado worker</li>
|
||||
<li>gevent_wsgi is now an alias of gevent_pywsgi</li>
|
||||
<li>Fix gevent_pywsgi worker</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id6">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.1 / 2012-03-02</a></h2>
|
||||
<ul class="simple">
|
||||
<li>fixing source archive, reducing its size</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id7">
|
||||
<h2><a class="toc-backref" href="#contents">0.14.0 / 2012-02-27</a></h2>
|
||||
<ul class="simple">
|
||||
<li>check if Request line is too large: You can now pass the parameter
|
||||
<tt class="docutils literal"><span class="pre">--limit-request-line</span></tt> or set the <tt class="docutils literal">limit_request_line</tt> in your
|
||||
configuration file to set the max size of the request line in bytes.</li>
|
||||
<li>limit the number of headers fields and their size. Add
|
||||
<tt class="docutils literal"><span class="pre">--limit-request-field</span></tt> and <tt class="docutils literal"><span class="pre">limit-request-field-size</span></tt> settings</li>
|
||||
<li>add <tt class="docutils literal">p</tt> variable to the log access format to log pidfile</li>
|
||||
<li>add <tt class="docutils literal">{HeaderName}o</tt> variable to the logo access format to log the
|
||||
response header HeaderName</li>
|
||||
<li>request header is now logged with the variable <tt class="docutils literal">{HeaderName}i</tt> in the
|
||||
access log file</li>
|
||||
<li>improve error logging</li>
|
||||
<li>support logging.configFile</li>
|
||||
<li>support django 1.4 in both gunicorn_django & run_gunicorn command</li>
|
||||
<li>improve reload in django run_gunicorn command (should just work now)</li>
|
||||
<li>allows people to set the <tt class="docutils literal"><span class="pre">X-Forwarded-For</span></tt> header key and disable it by
|
||||
setting an empty string.</li>
|
||||
<li>fix support of Tornado</li>
|
||||
<li>many other fixes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id8">
|
||||
<h2><a class="toc-backref" href="#contents">0.13.4 / 2011-09-23</a></h2>
|
||||
<ul class="simple">
|
||||
<li>fix util.closerange function used to prevent leaking fds on python 2.5
|
||||
(typo)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id9">
|
||||
<h2><a class="toc-backref" href="#contents">0.13.3 / 2011-09-19</a></h2>
|
||||
<ul class="simple">
|
||||
<li>refactor gevent worker</li>
|
||||
<li>prevent leaking fds on reexec</li>
|
||||
<li>fix inverted request_time computation</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id10">
|
||||
<h2><a class="toc-backref" href="#contents">0.13.2 / 2011-09-17</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Add support for Tornado 2.0 in tornado worker</li>
|
||||
<li>Improve access logs: allows customisation of the log format & add
|
||||
request time</li>
|
||||
<li>Logger module is now pluggable</li>
|
||||
<li>Improve graceful shutdown in Python versions >= 2.6</li>
|
||||
<li>Fix post_request root arity for compatibility</li>
|
||||
<li>Fix sendfile support</li>
|
||||
<li>Fix Django reloading</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id11">
|
||||
<h2><a class="toc-backref" href="#contents">0.13.1 / 2011-08-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix unix socket. log argument was missing.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h2><a class="toc-backref" href="#contents">0.13.0 / 2011-08-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Improve logging: allows file-reopening and add access log file
|
||||
compatible with the <a class="reference external" href="http://httpd.apache.org/docs/2.0/logs.html#combined">apache combined log format</a></li>
|
||||
<li>Add the possibility to set custom SSL headers. X-Forwarded-Protocol
|
||||
and X-Forwarded-SSL are still the default</li>
|
||||
<li>New <cite>on_reload</cite> hook to customize how gunicorn spawn new workers on
|
||||
SIGHUP</li>
|
||||
<li>Handle projects with relative path in django_gunicorn command</li>
|
||||
<li>Preserve path parameters in PATH_INFO</li>
|
||||
<li>post_request hook now accepts the environ as argument.</li>
|
||||
<li>When stopping the arbiter, close the listener asap.</li>
|
||||
<li>Fix Django command <cite>run_gunicorn</cite> in settings reloading</li>
|
||||
<li>Fix <a class="reference external" href="http://www.tornadoweb.org/">Tornado</a> worker exiting</li>
|
||||
<li>Fix the use of sendfile in wsgi.file_wrapper</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id13">
|
||||
<h2><a class="toc-backref" href="#contents">0.12.2 / 2011-05-18</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Add wsgi.file_wrapper optimised for FreeBSD, Linux & MacOSX (use
|
||||
sendfile if available)</li>
|
||||
<li>Fix django run_gunicorn command. Make sure we reload the application
|
||||
code.</li>
|
||||
<li>Fix django localisation</li>
|
||||
<li>Compatible with gevent 0.14dev</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id14">
|
||||
<h2><a class="toc-backref" href="#contents">0.12.1 / 2011-03-23</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Add "on_starting" hook. This hook can be used to set anything before
|
||||
the arbiter really start</li>
|
||||
<li>Support bdist_rpm in setup</li>
|
||||
<li>Improve content-length handling (pep 3333)</li>
|
||||
<li>Improve Django support</li>
|
||||
<li>Fix daemonizing (#142)</li>
|
||||
<li>Fix ipv6 handling</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id15">
|
||||
<h2><a class="toc-backref" href="#contents">0.12.0 / 2010-12-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Add support for logging configuration using a ini file.
|
||||
It uses the standard Python logging's module Configuration
|
||||
file format and allows anyone to use his custom file handler</li>
|
||||
<li>Add IPV6 support</li>
|
||||
<li>Add multidomain application example</li>
|
||||
<li>Improve gunicorn_django command when importing settings module
|
||||
using DJANGO_SETTINGS_MODULE environment variable</li>
|
||||
<li>Send appropriate error status on http parsing</li>
|
||||
<li>Fix pidfile, set permissions so other user can read
|
||||
it and use it.</li>
|
||||
<li>Fix temporary file leaking</li>
|
||||
<li>Fix setpgrp issue, can now be launched via ubuntu upstart</li>
|
||||
<li>Set the number of workers to zero on WINCH</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id16">
|
||||
<h2><a class="toc-backref" href="#contents">0.11.2 / 2010-10-30</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Add SERVER_SOFTWARE to the os.environ</li>
|
||||
<li>Add support for django settings environement variable</li>
|
||||
<li>Add support for logging configuration in Paster ini-files</li>
|
||||
<li>Improve arbiter notification in asynchronous workers</li>
|
||||
<li>Display the right error when a worker can't be used</li>
|
||||
<li>Fix Django support</li>
|
||||
<li>Fix HUP with Paster applications</li>
|
||||
<li>Fix readline in wsgi.input</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id17">
|
||||
<h2><a class="toc-backref" href="#contents">0.11.1 / 2010-09-02</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Implement max-requests feature to prevent memory leaks.</li>
|
||||
<li>Added 'worker_exit' server hook.</li>
|
||||
<li>Reseed the random number generator after fork().</li>
|
||||
<li>Improve Eventlet worker.</li>
|
||||
<li>Fix Django command <cite>run_gunicorn</cite>.</li>
|
||||
<li>Fix the default proc name internal setting.</li>
|
||||
<li>Workaround to prevent Gevent worker to segfault on MacOSX.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id18">
|
||||
<h2><a class="toc-backref" href="#contents">0.11.0 / 2010-08-12</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Improve dramatically performances of Gevent and Eventlet workers</li>
|
||||
<li>Optimize HTTP parsing</li>
|
||||
<li>Drop Server and Date headers in start_response when provided.</li>
|
||||
<li>Fix latency issue in async workers</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id19">
|
||||
<h2><a class="toc-backref" href="#contents">0.10.1 / 2010-08-06</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Improve gevent's workers. Add "egg:gunicorn#gevent_wsgi" worker using
|
||||
<a class="reference external" href="http://www.gevent.org/gevent.wsgi.html">gevent.wsgi</a> and
|
||||
"egg:gunicorn#gevent_pywsgi" worker using <a class="reference external" href="http://www.gevent.org/gevent.pywsgi.html">gevent.pywsgi</a> .
|
||||
<strong>"egg:gunicorn#gevent"</strong> using our own HTTP parser is still here and
|
||||
is <strong>recommended</strong> for normal uses. Use the "gevent.wsgi" parser if you
|
||||
need really fast connections and don't need streaming, keepalive or ssl.</li>
|
||||
<li>Add pre/post request hooks</li>
|
||||
<li>Exit more quietly</li>
|
||||
<li>Fix gevent dns issue</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id20">
|
||||
<h2><a class="toc-backref" href="#contents">0.10.0 / 2010-07-08</a></h2>
|
||||
<ul class="simple">
|
||||
<li>New HTTP parser.</li>
|
||||
<li>New HUP behaviour. Re-reads the configuration and then reloads all
|
||||
worker processes without changing the master process id. Helpful for
|
||||
code reloading and monitoring applications like supervisord and runit.</li>
|
||||
<li>Added a preload configuration parameter. By default, application code
|
||||
is now loaded after a worker forks. This couple with the new HUP
|
||||
handling can be used for dev servers to do hot code reloading. Using
|
||||
the preload flag can help a bit in small memory VM's.</li>
|
||||
<li>Allow people to pass command line arguments to WSGI applications. See:
|
||||
<a class="reference external" href="http://github.com/benoitc/gunicorn/raw/master/examples/alt_spec.py">examples/alt_spec.py</a></li>
|
||||
<li>Added an example gevent reloader configuration:
|
||||
<a class="reference external" href="http://github.com/benoitc/gunicorn/blob/master/examples/example_gevent_reloader.py">examples/example_gevent_reloader.py</a>.</li>
|
||||
<li>New gevent worker "egg:gunicorn#gevent2", working with gevent.wsgi.</li>
|
||||
<li>Internal refactoring and various bug fixes.</li>
|
||||
<li>New documentation website.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id21">
|
||||
<h2><a class="toc-backref" href="#contents">0.9.1 / 2010-05-26</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Support https via X-Forwarded-Protocol or X-Forwarded-Ssl headers</li>
|
||||
<li>Fix configuration</li>
|
||||
<li>Remove -d options which was used instead of -D for daemon.</li>
|
||||
<li>Fix umask in unix socket</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id22">
|
||||
<h2><a class="toc-backref" href="#contents">0.9.0 / 2010-05-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added <em>when_ready</em> hook. Called just after the server is started</li>
|
||||
<li>Added <em>preload</em> setting. Load application code before the worker processes
|
||||
are forked.</li>
|
||||
<li>Refactored Config</li>
|
||||
<li>Fix pidfile</li>
|
||||
<li>Fix QUIT/HUP in async workers</li>
|
||||
<li>Fix reexec</li>
|
||||
<li>Documentation improvements</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id23">
|
||||
<h2><a class="toc-backref" href="#contents">0.8.1 / 2010-04-29</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix builtins import in config</li>
|
||||
<li>Fix installation with pip</li>
|
||||
<li>Fix Tornado WSGI support</li>
|
||||
<li>Delay application loading until after processing all configuration</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id24">
|
||||
<h2><a class="toc-backref" href="#contents">0.8.0 / 2010-04-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Refactored Worker management for better async support. Now use the -k option
|
||||
to set the type of request processing to use</li>
|
||||
<li>Added support for <a class="reference external" href="http://www.tornadoweb.org/">Tornado</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id25">
|
||||
<h2><a class="toc-backref" href="#contents">0.7.2 / 2010-04-15</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added --spew option to help debugging (installs a system trace hook)</li>
|
||||
<li>Some fixes in async arbiters</li>
|
||||
<li>Fix a bug in start_response on error</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id26">
|
||||
<h2><a class="toc-backref" href="#contents">0.7.1 / 2010-04-01</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix bug when responses have no body.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id27">
|
||||
<h2><a class="toc-backref" href="#contents">0.7.0 / 2010-03-26</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added support for <a class="reference external" href="http://eventlet.net">Eventlet</a> and <a class="reference external" href="http://gevent.org">Gevent</a> based workers.</li>
|
||||
<li>Added <a class="reference external" href="http://dev.w3.org/html5/websockets/">Websockets</a> support</li>
|
||||
<li>Fix Chunked Encoding</li>
|
||||
<li>Fix SIGWINCH on <a class="reference external" href="http://openbsd.org">OpenBSD</a></li>
|
||||
<li>Fix <a class="reference external" href="http://www.python.org/dev/peps/pep-0333/">PEP 333</a> compliance for the write callable.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id28">
|
||||
<h2><a class="toc-backref" href="#contents">0.6.5 / 2010-03-11</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix pidfile handling</li>
|
||||
<li>Fix Exception Error</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id29">
|
||||
<h2><a class="toc-backref" href="#contents">0.6.4 / 2010-03-08</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Use cStringIO for performance when possible.</li>
|
||||
<li>Fix worker freeze when a remote connection closes unexpectedly.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id30">
|
||||
<h2><a class="toc-backref" href="#contents">0.6.3 / 2010-03-07</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Make HTTP parsing faster.</li>
|
||||
<li>Various bug fixes</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id31">
|
||||
<h2><a class="toc-backref" href="#contents">0.6.2 / 2010-03-01</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added support for chunked response.</li>
|
||||
<li>Added proc_name option to the config file.</li>
|
||||
<li>Improved the HTTP parser. It now uses buffers instead of strings to store
|
||||
temporary data.</li>
|
||||
<li>Improved performance when sending responses.</li>
|
||||
<li>Workers are now murdered by age (the oldest is killed first).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id32">
|
||||
<h2><a class="toc-backref" href="#contents">0.6.1 / 2010-02-24</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added gunicorn config file support for Django admin command</li>
|
||||
<li>Fix gunicorn config file. -c was broken.</li>
|
||||
<li>Removed TTIN/TTOU from workers which blocked other signals.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id33">
|
||||
<h2><a class="toc-backref" href="#contents">0.6 / 2010-02-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added setproctitle support</li>
|
||||
<li>Change privilege switch behavior. We now work like NGINX, master keeps the
|
||||
permissions, new uid/gid permissions are only set for workers.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id34">
|
||||
<h2><a class="toc-backref" href="#contents">0.5.1 / 2010-02-22</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Fix umask</li>
|
||||
<li>Added Debian packaging</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="id35">
|
||||
<h2><a class="toc-backref" href="#contents">0.5 / 2010-02-20</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Added <a class="reference external" href="configuration.html">configuration file</a> handler.</li>
|
||||
<li>Added support for pre/post fork hooks</li>
|
||||
<li>Added support for before_exec hook</li>
|
||||
<li>Added support for unix sockets</li>
|
||||
<li>Added launch of workers processes under different user/group</li>
|
||||
<li>Added umask option</li>
|
||||
<li>Added SCRIPT_NAME support</li>
|
||||
<li>Better support of some exotic settings for Django projects</li>
|
||||
<li>Better support of Paste-compatible applications</li>
|
||||
<li>Some refactoring to make the code easier to hack</li>
|
||||
<li>Allow multiple keys in request and response headers</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#id1" id="id36">0.14.6 / 2012-07-26</a></li>
|
||||
<li><a class="reference internal" href="#id2" id="id37">0.14.5 / 2012-06-24</a></li>
|
||||
<li><a class="reference internal" href="#id3" id="id38">0.14.4 / 2012-06-24</a></li>
|
||||
<li><a class="reference internal" href="#id4" id="id39">0.14.3 / 2012-05-15</a></li>
|
||||
<li><a class="reference internal" href="#id5" id="id40">0.14.2 / 2012-03-16</a></li>
|
||||
<li><a class="reference internal" href="#id6" id="id41">0.14.1 / 2012-03-02</a></li>
|
||||
<li><a class="reference internal" href="#id7" id="id42">0.14.0 / 2012-02-27</a></li>
|
||||
<li><a class="reference internal" href="#id8" id="id43">0.13.4 / 2011-09-23</a></li>
|
||||
<li><a class="reference internal" href="#id9" id="id44">0.13.3 / 2011-09-19</a></li>
|
||||
<li><a class="reference internal" href="#id10" id="id45">0.13.2 / 2011-09-17</a></li>
|
||||
<li><a class="reference internal" href="#id11" id="id46">0.13.1 / 2011-08-22</a></li>
|
||||
<li><a class="reference internal" href="#id12" id="id47">0.13.0 / 2011-08-22</a></li>
|
||||
<li><a class="reference internal" href="#id13" id="id48">0.12.2 / 2011-05-18</a></li>
|
||||
<li><a class="reference internal" href="#id14" id="id49">0.12.1 / 2011-03-23</a></li>
|
||||
<li><a class="reference internal" href="#id15" id="id50">0.12.0 / 2010-12-22</a></li>
|
||||
<li><a class="reference internal" href="#id16" id="id51">0.11.2 / 2010-10-30</a></li>
|
||||
<li><a class="reference internal" href="#id17" id="id52">0.11.1 / 2010-09-02</a></li>
|
||||
<li><a class="reference internal" href="#id18" id="id53">0.11.0 / 2010-08-12</a></li>
|
||||
<li><a class="reference internal" href="#id19" id="id54">0.10.1 / 2010-08-06</a></li>
|
||||
<li><a class="reference internal" href="#id20" id="id55">0.10.0 / 2010-07-08</a></li>
|
||||
<li><a class="reference internal" href="#id21" id="id56">0.9.1 / 2010-05-26</a></li>
|
||||
<li><a class="reference internal" href="#id22" id="id57">0.9.0 / 2010-05-24</a></li>
|
||||
<li><a class="reference internal" href="#id23" id="id58">0.8.1 / 2010-04-29</a></li>
|
||||
<li><a class="reference internal" href="#id24" id="id59">0.8.0 / 2010-04-22</a></li>
|
||||
<li><a class="reference internal" href="#id25" id="id60">0.7.2 / 2010-04-15</a></li>
|
||||
<li><a class="reference internal" href="#id26" id="id61">0.7.1 / 2010-04-01</a></li>
|
||||
<li><a class="reference internal" href="#id27" id="id62">0.7.0 / 2010-03-26</a></li>
|
||||
<li><a class="reference internal" href="#id28" id="id63">0.6.5 / 2010-03-11</a></li>
|
||||
<li><a class="reference internal" href="#id29" id="id64">0.6.4 / 2010-03-08</a></li>
|
||||
<li><a class="reference internal" href="#id30" id="id65">0.6.3 / 2010-03-07</a></li>
|
||||
<li><a class="reference internal" href="#id31" id="id66">0.6.2 / 2010-03-01</a></li>
|
||||
<li><a class="reference internal" href="#id32" id="id67">0.6.1 / 2010-02-24</a></li>
|
||||
<li><a class="reference internal" href="#id33" id="id68">0.6 / 2010-02-22</a></li>
|
||||
<li><a class="reference internal" href="#id34" id="id69">0.5.1 / 2010-02-22</a></li>
|
||||
<li><a class="reference internal" href="#id35" id="id70">0.5 / 2010-02-20</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,173 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Run</title>
|
||||
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" class="twocolumn">
|
||||
<div id="menu">
|
||||
<div class="logo">
|
||||
<a href="./">
|
||||
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
||||
</a>
|
||||
</div>
|
||||
<ul id="actions">
|
||||
<li><a href="install.html">Install</a></li>
|
||||
<li><a href="run.html">Run</a></li>
|
||||
<li><a href="configure.html">Configure</a></li>
|
||||
<li><a href="deploy.html">Deploy</a></li>
|
||||
<li><a href="design.html">Design</a></li>
|
||||
<li><a href="faq.html">FAQ</a></li>
|
||||
<li><a href="community.html">Community</a></li>
|
||||
<li><a href="news.html">News</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
||||
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="document">
|
||||
<div class="section" id="commands">
|
||||
<h2><a class="toc-backref" href="#contents">Commands</a></h2>
|
||||
<p>After installing Gunicorn you will have access to three command line scripts
|
||||
that can be used for serving the various supported web frameworks:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal">gunicorn</tt></li>
|
||||
<li><tt class="docutils literal">gunicorn_django</tt></li>
|
||||
<li><tt class="docutils literal">gunicorn_paster</tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<div class="section" id="gunicorn">
|
||||
<h3><a class="toc-backref" href="#contents">gunicorn</a></h3>
|
||||
<p>The first and most basic script is used to serve 'bare' WSGI applications
|
||||
that don't require a translation layer. Basic usage:</p>
|
||||
<pre class="literal-block">
|
||||
$ gunicorn [OPTIONS] APP_MODULE
|
||||
</pre>
|
||||
<p>Where <tt class="docutils literal">APP_MODULE</tt> is of the pattern <tt class="docutils literal"><span class="pre">$(MODULE_NAME):$(VARIABLE_NAME)</span></tt>. The
|
||||
module name can be a full dotted path. The variable name refers to a WSGI
|
||||
callable that should be found in the specified module.</p>
|
||||
<p>Example with test app:</p>
|
||||
<pre class="literal-block">
|
||||
$ cd examples
|
||||
$ cat test.py
|
||||
# -*- coding: utf-8 -
|
||||
#
|
||||
# This file is part of gunicorn released under the MIT license.
|
||||
# See the NOTICE for more information.
|
||||
|
||||
def app(environ, start_response):
|
||||
"""Simplest possible application object"""
|
||||
data = 'Hello, World!\n'
|
||||
status = '200 OK'
|
||||
response_headers = [
|
||||
('Content-type','text/plain'),
|
||||
('Content-Length', str(len(data)))
|
||||
]
|
||||
start_response(status, response_headers)
|
||||
return iter([data])
|
||||
|
||||
$ gunicorn --workers=2 test:app
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="gunicorn-django">
|
||||
<h3><a class="toc-backref" href="#contents">gunicorn_django</a></h3>
|
||||
<p>You might not have guessed it, but this script is used to serve Django
|
||||
applications. Basic usage:</p>
|
||||
<pre class="literal-block">
|
||||
$ gunicorn_django [OPTIONS] [SETTINGS_PATH]
|
||||
</pre>
|
||||
<p>By default <tt class="docutils literal">SETTINGS_PATH</tt> will look for <tt class="docutils literal">settings.py</tt> in the current
|
||||
directory.</p>
|
||||
<p>Example with your Django project:</p>
|
||||
<pre class="literal-block">
|
||||
$ cd path/to/yourdjangoproject
|
||||
$ gunicorn_django --workers=2
|
||||
</pre>
|
||||
<div class="note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">If you run Django 1.4 and superior, it's higly recommanded to
|
||||
simply run your application with the <a class="reference external" href="https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/">WSGI interface</a> using
|
||||
the <a class="reference internal" href="#gunicorn">gunicorn</a> command.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="gunicorn-paster">
|
||||
<h3><a class="toc-backref" href="#contents">gunicorn_paster</a></h3>
|
||||
<p>Yeah, for Paster-compatible frameworks (Pylons, TurboGears 2, ...). We
|
||||
apologize for the lack of script name creativity. And some usage:</p>
|
||||
<pre class="literal-block">
|
||||
$ gunicorn_paster [OPTIONS] paste_config.ini
|
||||
</pre>
|
||||
<p>Simple example:</p>
|
||||
<pre class="literal-block">
|
||||
$ cd yourpasteproject
|
||||
$ gunicorn_paste --workers=2 development.ini
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="integration">
|
||||
<h2><a class="toc-backref" href="#contents">Integration</a></h2>
|
||||
<p>Alternatively, we also provide integration for both Django and Paster
|
||||
applications in case your deployment strategy would be better served by such
|
||||
invocation styles.</p>
|
||||
<div class="section" id="django-manage-py">
|
||||
<h3><a class="toc-backref" href="#contents">Django ./manage.py</a></h3>
|
||||
<p>You can add a <tt class="docutils literal">run_gunicorn</tt> command to your <tt class="docutils literal">./manage.py</tt> simply by adding
|
||||
gunicorn to your <tt class="docutils literal">INSTALLED_APPS</tt>:</p>
|
||||
<pre class="literal-block">
|
||||
INSTALLED_APPS = (
|
||||
...
|
||||
"gunicorn",
|
||||
)
|
||||
</pre>
|
||||
<p>Then you can run:</p>
|
||||
<pre class="literal-block">
|
||||
python manage.py run_gunicorn
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="paster-serve">
|
||||
<h3><a class="toc-backref" href="#contents">paster serve</a></h3>
|
||||
<p>If you're wanting to keep on keeping on with the usual paster serve command,
|
||||
you can specify the Gunicorn server settings in your configuration file:</p>
|
||||
<pre class="literal-block">
|
||||
[server:main]
|
||||
use = egg:gunicorn#main
|
||||
host = 127.0.0.1
|
||||
port = 5000
|
||||
</pre>
|
||||
<p>And then as per usual:</p>
|
||||
<pre class="literal-block">
|
||||
$ cd yourpasteproject
|
||||
$ paster serve development.ini workers=2
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toc">
|
||||
<div class="contents topic" id="contents">
|
||||
<p class="topic-title first">Contents</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#commands" id="id1">Commands</a><ul>
|
||||
<li><a class="reference internal" href="#gunicorn" id="id2">gunicorn</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-django" id="id3">gunicorn_django</a></li>
|
||||
<li><a class="reference internal" href="#gunicorn-paster" id="id4">gunicorn_paster</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#integration" id="id5">Integration</a><ul>
|
||||
<li><a class="reference internal" href="#django-manage-py" id="id6">Django ./manage.py</a></li>
|
||||
<li><a class="reference internal" href="#paster-serve" id="id7">paster serve</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Site Content License <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
|
||||
<p>Hosted on <a href="http://github.com/">GitHub</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="2;url=http://gunicorn.org/faq.html" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - FAQ</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/faq.html">here</a>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="refresh" content="2;url=http://gunicorn.org/run.html" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="refresh" content="0;url=http://gunicorn.org/">
|
||||
<title>Green Unicorn - Run</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Redirecting to <a href="http://gunicorn.org/run.html">here</a>
|
||||
Redirecting to <a href="http://gunicorn.org/">here</a>
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||