fix doc for rtd

This commit is contained in:
benoitc 2013-12-26 13:42:17 +01:00
parent 77a30d3671
commit f7d9979d5b
5 changed files with 62 additions and 54 deletions

View File

@ -3,6 +3,8 @@ import inspect
import gunicorn.config as guncfg
HEAD = """
.. _settings:
Settings
========

View File

@ -31,31 +31,20 @@ Once again, in order of least to most authoritative:
It also allows you to know if your application can be launched.
Framework Settings
==================
Command Line
============
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 issue_ to
let us know.
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::
.. _issue: http://github.com/benoitc/gunicorn/issues
$ gunicorn -h
Paster Applications
-------------------
There is also a ``--version`` flag available to the command line scripts that
isn't mentioned in the list of :ref:`settings <settings>`.
In your INI file, you can specify to use Gunicorn as the server like such::
[server:main]
use = egg:gunicorn#main
host = 192.168.0.1
port = 80
workers = 2
proc_name = brim
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.
Configuration File
==================
@ -85,18 +74,31 @@ number of processors::
raise RuntimeError("No sysconf detected.")
return os.sysconf("SC_NPROCESSORS_ONLN")
Command Line
============
All the settings are mentionned in the :ref:`settings <settings>` list.
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::
$ gunicorn -h
Framework Settings
==================
There is also a ``--version`` flag available to the command line scripts that
isn't mentioned in the list of settings.
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 issue_ to
let us know.
.. include:: settings.rst
.. _issue: http://github.com/benoitc/gunicorn/issues
Paster Applications
-------------------
In your INI file, you can specify to use Gunicorn as the server like such::
[server:main]
use = egg:gunicorn#main
host = 192.168.0.1
port = 80
workers = 2
proc_name = brim
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.

View File

@ -1,3 +1,4 @@
.. _design:
======

View File

@ -22,7 +22,7 @@ Features
.. note::
main Gunicorn website on http://gunicorn.org
main Gunicorn website on http://gunicorn.org
.. note::
@ -34,11 +34,12 @@ Contents
--------
.. toctree::
:titlesonly:
:maxdepth: 2
install
run
configure
settings
deploy
design
signals

View File

@ -1,4 +1,6 @@
.. _settings:
Settings
========
@ -417,20 +419,20 @@ By default:
%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
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
| 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
errorlog
~~~~~~~~
@ -771,12 +773,12 @@ PROXY protocol: http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt
Example for stunnel config::
[https]
protocol = proxy
accept = 443
connect = 80
cert = /etc/ssl/certs/stunnel.pem
key = /etc/ssl/certs/stunnel.key
[https]
protocol = proxy
accept = 443
connect = 80
cert = /etc/ssl/certs/stunnel.pem
key = /etc/ssl/certs/stunnel.key
proxy_allow_ips
~~~~~~~~~~~~~~~