mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix doc for rtd
This commit is contained in:
parent
77a30d3671
commit
f7d9979d5b
@ -3,6 +3,8 @@ import inspect
|
|||||||
import gunicorn.config as guncfg
|
import gunicorn.config as guncfg
|
||||||
|
|
||||||
HEAD = """
|
HEAD = """
|
||||||
|
.. _settings:
|
||||||
|
|
||||||
Settings
|
Settings
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
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
|
If an option is specified on the command line, it overrides all other values
|
||||||
settings. If you have ideas for providing settings to WSGI applications or
|
that may have been specified in the app specific settings, or in the optional
|
||||||
pulling information from Django's settings.py feel free to open an issue_ to
|
configuration file. Not all Gunicorn settings are available to be set from the
|
||||||
let us know.
|
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
|
Configuration File
|
||||||
==================
|
==================
|
||||||
@ -85,18 +74,31 @@ number of processors::
|
|||||||
raise RuntimeError("No sysconf detected.")
|
raise RuntimeError("No sysconf detected.")
|
||||||
return os.sysconf("SC_NPROCESSORS_ONLN")
|
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
|
Currently, only Paster applications have access to framework specific
|
||||||
isn't mentioned in the list of settings.
|
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.
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
.. _design:
|
.. _design:
|
||||||
|
|
||||||
======
|
======
|
||||||
|
|||||||
@ -34,11 +34,12 @@ Contents
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:maxdepth: 2
|
||||||
|
|
||||||
install
|
install
|
||||||
run
|
run
|
||||||
configure
|
configure
|
||||||
|
settings
|
||||||
deploy
|
deploy
|
||||||
design
|
design
|
||||||
signals
|
signals
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
.. _settings:
|
||||||
|
|
||||||
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)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
|
||||||
|
|
||||||
|
|
||||||
h: remote address
|
| h: remote address
|
||||||
l: '-'
|
| l: '-'
|
||||||
u: currently '-', may be user name in future releases
|
| u: currently '-', may be user name in future releases
|
||||||
t: date of the request
|
| t: date of the request
|
||||||
r: status line (ex: GET / HTTP/1.1)
|
| r: status line (ex: GET / HTTP/1.1)
|
||||||
s: status
|
| s: status
|
||||||
b: response length or '-'
|
| b: response length or '-'
|
||||||
f: referer
|
| f: referer
|
||||||
a: user agent
|
| a: user agent
|
||||||
T: request time in seconds
|
| T: request time in seconds
|
||||||
D: request time in microseconds,
|
| D: request time in microseconds,
|
||||||
p: process ID
|
| p: process ID
|
||||||
{Header}i: request header
|
| {Header}i: request header
|
||||||
{Header}o: response header
|
| {Header}o: response header
|
||||||
|
|
||||||
errorlog
|
errorlog
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
@ -771,12 +773,12 @@ PROXY protocol: http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt
|
|||||||
|
|
||||||
Example for stunnel config::
|
Example for stunnel config::
|
||||||
|
|
||||||
[https]
|
[https]
|
||||||
protocol = proxy
|
protocol = proxy
|
||||||
accept = 443
|
accept = 443
|
||||||
connect = 80
|
connect = 80
|
||||||
cert = /etc/ssl/certs/stunnel.pem
|
cert = /etc/ssl/certs/stunnel.pem
|
||||||
key = /etc/ssl/certs/stunnel.key
|
key = /etc/ssl/certs/stunnel.key
|
||||||
|
|
||||||
proxy_allow_ips
|
proxy_allow_ips
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user