Ticket #3135: 3135.diff

File 3135.diff, 2.8 KB (added by Simon G. <dev@…>, 8 years ago)
  • settings.txt

     
    197197
    198198    (('John', 'john@example.com'), ('Mary', 'mary@example.com'))
    199199
     200
     201Note that Django will email all of these people when there's an error, see ``Django Error-reporting via Email`` for more information.
     202
     203
    200204ALLOWED_INCLUDE_ROOTS
    201205---------------------
    202206
     
    414418
    415419Default: ``('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')``
    416420
    417 See also ``IGNORABLE_404_STARTS``.
     421See also ``IGNORABLE_404_STARTS`` and ``Django Error-reporting via Email``
    418422
    419423IGNORABLE_404_STARTS
    420424--------------------
     
    422426Default: ``('/cgi-bin/', '/_vti_bin', '/_vti_inf')``
    423427
    424428A tuple of strings that specify beginnings of URLs that should be ignored by
    425 the 404 e-mailer. See ``SEND_BROKEN_LINK_EMAILS`` and ``IGNORABLE_404_ENDS``.
     429the 404 e-mailer. See ``SEND_BROKEN_LINK_EMAILS``, ``IGNORABLE_404_ENDS`` and
     430``Django Error-reporting via Email``
    426431
    427432INSTALLED_APPS
    428433--------------
     
    631636Whether to send an e-mail to the ``MANAGERS`` each time somebody visits a
    632637Django-powered page that is 404ed with a non-empty referer (i.e., a broken
    633638link). This is only used if ``CommonMiddleware`` is installed (see the
    634 `middleware docs`_). See also ``IGNORABLE_404_STARTS`` and
    635 ``IGNORABLE_404_ENDS``.
     639`middleware docs`_). See also ``IGNORABLE_404_STARTS``,
     640``IGNORABLE_404_ENDS`` and ``Django Error-reporting via Email``
    636641
    637642SERVER_EMAIL
    638643------------
     
    967972
    968973It boils down to this: Use exactly one of either ``configure()`` or
    969974``DJANGO_SETTINGS_MODULE``. Not both, and not neither.
     975
     976
     977Django Error-reporting via Email
     978================================
     979
     980When ``DEBUG`` mode is turned off, Django will email the users listed in the ``ADMIN`` setting whenever a server error occurs. This is most commonly when a resource is not found (404 errors), or when there's been an internal server error (500). This gives the administrators immediate notification of any errors.
     981
     982However, there are certain cases when this is not appropriate. For example, it's quite common to get miscreants doing random scans for vulnerabilities, such as vulnerable versions of ``xmlhttp.php`` or ``PhpMyAdmin``. Since Django is not affected by these, they can be safely ignored.
     983
     984You can tell Django to stop reporting these 404's by adding the page to the  ``IGNORABLE_404_ENDS`` setting:
     985
     986        IGNORABLE_404_ENDS = ('xmlhttp.php')
     987
     988Or, you can ignore it using the start of the request path, by using the ``IGNORABLE_404_STARTS`` setting:
     989
     990        IGNORABLE_404_STARTS = ('/phpmyadmin/')
     991
     992Finally, if you wish to turn off this email reporting completely, just remove all entries from the ``ADMINS`` setting.
     993 No newline at end of file
Back to Top