57 Commits

Author SHA1 Message Date
Paul J. Dorn
256d474a79 docs: revert duped directive 2024-08-09 00:28:08 +02:00
Paul J. Dorn
3e042e8269 Configurable list of forwarder headers 2024-08-07 20:15:13 +02:00
Benoit Chesneau
c829cc8a77
Merge pull request #2548 from zhan9san/1695-ignore-aborted-requests
Fixes #1695
2023-05-10 15:43:27 +02:00
usr3
99447b0827
Fix typo in deploy.rst 2022-03-13 14:41:33 +05:30
Jack Zhang
90ef9a6a94 Add nginx documentation for proxy_ignore_client_abort 2021-06-10 10:40:13 +08:00
Jack Zhang
917ebcdd57 Fixes #1695 2021-03-25 22:31:58 +08:00
Sanjay
4b9afb47bd
Probably a typo 2020-06-08 11:38:20 +05:30
Ewoud Kohl van Wijngaarden
4ababc368b
Correct systemd socket activation example 2020-05-05 12:49:22 +02:00
Дамјан Георгиевски
ba0d784960 documentation: update systemd deploy unit examples (#1950)
There's no need for PIDFile=, especially not for Type=notify services.
systemd knows the correct pid of the process it manages.

No need for the `--bind` option either, since gunicorn supports the
LISTEN_FDS environment variable and will use all of the sockets that systemd
provides. This way, it's also more flexible, since we can specify several
sockets in a .socket unit.

The .socket unit should specify User=www-data so that nginx can connect to the socket.
The service (gunicorn process) will inherit the file descriptor so it
doesn't even need permissions for the socket (it's nginx which needs
permissions).

tmpfiles.d is not needed.

replace ExecStop=/bin/kill with KillMode=mixed
2019-01-11 13:52:06 +01:00
Дамјан Георгиевски
9184ae8898 add systemd sd_notify support (#1897)
* add systemd sd_notify support

roughly based on sd_notify() from systemd and https://github.com/bb4242/sdnotify

only implements `READY=1` and `STATUS=Gunicorn arbiter booted` of the
protocol in the arbiter. in the future, reloads can be notified, and
possibly also other statuses.

see https://www.freedesktop.org/software/systemd/man/sd_notify.html for
more info

sd_notify() is a noop when not run in a systemd service (i.e
NOTIFY_SOCKET environment variable is not set)
2019-01-11 04:41:09 +01:00
Ron DuPlain
6d76ed8e6c Provide guidance on X-Forwarded-For access log. (#1906)
The doc change introduced in #1037 is initially helpful but then internally
inconsistent. It correctly points out that X-Forwarded-For is no longer
used in setting REMOTE_ADDR (c4873681299212d6082cd9902740eef18c2f14f1),
but then confusingly indicates a solution using the X-Forwarded-For header.

The deployment doc provides a full configuration example which includes
proxy headers as set by nginx. What is missing, before this patch, is a
clear suggestion on how to make use of the header in Gunicorn's access
log.

Accordingly, remove the confusing suggestion and replace it with a drop-in
replacement for Gunicorn's default access log format.
2018-11-16 19:52:37 +03:00
Arianit Uka
bb0b366b26 Fixed systemd documentation to properly setup gunicorn unix socket
The systemd files recommended in the docs do not work. The socket file disappears after the first request, or after the service is restarted. 

This commit updates the systemd files to include the correct settings
2018-10-12 13:07:38 -07:00
Patrick
9cf5b13f93 Labeled the name of the file in the sample (#1782)
The sample as-is was not clear about what file the configuration was to go in. 
This sample is to go into nginx.conf, but nginx as of 20180516 has
nginx.conf + conf.f/default.conf. This sample overrides all that into the single
file so being specific is better.
2018-05-19 11:29:13 +03:00
Randall Leeds
b07532be75 Forbid contradictory secure scheme headers
When a request specifies contradictory secure scheme headers, raise a
parse error.
2018-01-10 12:10:35 -08:00
T N
6ad3d3c22c Update docs links (#1592) 2017-09-16 17:46:19 +03:00
David McInnis
7dd8793dcf only have essential nginx.conf settings (#1424) 2017-01-08 04:03:08 +03:00
vishesh92
c54426c1e4 Minor fixes in docs and doc's code style (#1361) 2016-12-28 19:02:32 +03:00
Bob.Haddleton
9a9e3acb2c Update Boom references to Hey to reflect project name change 2016-12-22 07:52:21 +03:00
Tim Graham
ab81ae3b4d Add RuntimeDirectory to systemd service
Without this /run/gunicorn isn't created.
2016-11-26 17:04:44 +03:00
David McInnis
ea741854ec fixed a few typos and improved clarity for systemd docs (#1398) 2016-11-23 01:40:02 +03:00
David McInnis
4ceb1e4a00 Docs/system d change (#1376)
* expanded and clarified systemd deployment instructions

* fixed typo

* fixed typo

* fixed my stuff going past the 80-char page-width
2016-10-28 08:37:10 +02:00
David McInnis
1853071dc2 fixed incorrect gunicorn.service file for SystemD (#1357)
* fixed incorrect gunicorn.service file for SystemD

* made instructions a little less ambiguous

* made documentation more generic
2016-10-13 13:01:40 -07:00
ammgws
2d11e5c7cc Fixed mistake in systemd section (#1363)
example starts the wrong service name
2016-10-07 14:50:28 -07:00
Adam Chainz
f722a6eb65 Convert readthedocs link for their .org -> .io migration for hosted projects (#1286)
As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
2016-05-29 11:46:37 -07:00
David McInnis
d27bf96690 fixed typo where we start the wrong service 2016-05-12 11:52:27 -07:00
David McInnis
35f9e3e77c added some more detail for setting up gunicorn on systemd 2016-05-12 00:33:39 -07:00
benoitc
6f9ae5ee2f put a note that error logs are only errors from Gunicorn.
fix #1124
2016-05-02 15:41:16 +02:00
benoitc
5fa32a6dbc document LOGGING overriding
fix #1051
2016-05-02 15:18:07 +02:00
molivier
1025c4c55d Fix Slowloris broken link. Close #1142 2015-12-14 17:38:19 +01:00
Berker Peksag
e1912db59a Fix a Sphinx build warning. 2015-09-26 11:34:18 +03:00
Berker Peksag
353f610c1e Do not duplicate nginx config files.
Fixes #1050
2015-09-26 11:33:12 +03:00
Takuya Noguchi
46b70016d2 Update Debian/Ubuntu installation instructions. 2015-09-09 01:51:22 +09:00
Carl Meyer
2169b044d6 Update example nginx configs to require Host match. 2015-06-15 16:59:34 -06:00
Berker Peksag
308f10f398 Fix typo and tweak markup. 2015-05-29 06:46:28 +03:00
Hans Kristian Flaatten
85d857d711 Document why REMOTE_ADD may not be the user's IP
Gunicorn v19 removed functionality which updated `REMOTE_ADDR` to the value of
the `X-Forwared-For` header if received from a trusted upstream client.  This
was a violation of RFC 3875 CGI Version 1.1, and was hence removed.

Close: #1035
PR-URL: #1037
Related: #633

Signed-off-by: Hans Kristian Flaatten <hans.kristian.flaatten@turistforeningen.no>
2015-05-21 23:05:49 +02:00
s7v7nislands
80f95bdff4 update doc: using pip install replace using easy_install 2015-03-20 09:27:41 +02:00
benoitc
2d76b57454 point to the correct documentation link
fix #967
2015-01-30 09:42:46 +01:00
Eduard Iskandarov
52bade631b closes #875. add full working systemd configuration example 2014-09-13 14:16:25 +04:00
Collin Anderson
c97eae638f upstart: removed unneeded console log
It's there by default since Ubuntu 12.04
2014-09-09 11:02:31 -04:00
Randall Leeds
76ab68739e Fix logging settings link in deploy docs 2014-09-03 12:46:34 -07:00
Andrew Burdo
ed2d2a8ab3 Change the rest of QUIT and TERM signals.
This will restore graceful shutdown of workers by master.
Also worker_int callback is moved from handle_exit (INT and TERM before switching) to handle_quit(INT and QUIT).
2014-06-13 14:32:11 +03:00
Matt Robenolt
d7c7c59bdb Consistent usage of @proxy_to_app named location
This can be confusing since `location / {}` and `location @proxy_to_app {}` were both being used.
2014-05-26 20:24:09 -07:00
TedWantsMore
6248208ae0 Update deploy.rst 2014-05-21 15:49:50 -07:00
Kirill Zaborsky
9ce722e638 gafferp renamed to gaffer 2014-02-21 17:14:31 +03:00
Randall Leeds
0226b2cd1f Clarify secure scheme header warning in deploy doc
Gunicorn doesn't restrict the X-Forwarded-For header, only the
scheme header.
2014-02-04 00:26:03 -08:00
Randall Leeds
5d13659f0e Documentation formatting 2014-01-30 16:49:47 -08:00
Randall Leeds
1f7d3429c2 Add documentation for nginx X-Forwarded-*
Fix #571
2014-01-30 16:30:58 -08:00
benoitc
2a09c916a7 improve systemd conf 2013-12-11 09:50:24 +01:00
benoitc
047ef65afc fix doc
fix #656
2013-12-11 09:33:01 +01:00
Alasdair Nicol
a01d143aae Use lowercase 'true' in example config to be consistent 2013-12-02 00:08:26 +00:00