From 6f8d8b75956a4d0deeff1b6a212518dfd4258b0c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 17 Nov 2014 19:38:42 +0100 Subject: [PATCH] add nginx /myip tuning hint to the admin docs --- docs/admin.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/admin.rst b/docs/admin.rst index d676e7e..1be5234 100644 --- a/docs/admin.rst +++ b/docs/admin.rst @@ -371,3 +371,19 @@ troubles with them, try this):: Of course, you'll also need to restart the django/wsgi processes, so the new code gets loaded. + + +Tuning +------ + +If you get a lot of requests for /myip, the Python code handling this URL will +be rather busy. If you use nginx, you may optionally tune this and respond to +these requests directly from nginx without invoking any python code:: + + location /myip { + add_header Content-Type text/plain; + return 200 $remote_addr; + } + +You need to add this to all server blocks (IP v4, v6, both) that are dealing +with requests for the service.