reusable django app to log crawlers hitting many 404 pages.
Project description
Django Brokenlinks
==================
log brokenlinks to logfile and config fail2ban to ban crawlers hitting many 404 pages.
Requirements
------------
`django-appconf`
Installation
------------
::
$ pip install django-brokenlinks
Setup
-----
1. Add ``'brokenlinks'`` to INSTALLED_APPS
2. Add ``'brokenlinks.middleware.BrokenLinkEmailsMiddleware'`` to ``MIDDLEWARE_CLASSES``
3. Set the ``BROKENLINKS_LOG_PATH``
4. After change in brokenlinks configs run ``manage.py createbrokenlinksconfs`` once and use the result conf-files with fail2ban
your settings.py will look like below:
INSTALLED_APPS = (
# ...
'brokenlinks',
# ...
)
MIDDLEWARE_CLASSES= (
'brokenlinks.middleware.BrokenLinkEmailsMiddleware',
# ...
)
BROKENLINKS_LOG_PATH = '/path/to/brokenlinks.log'
then config fail2ban to use it
Author
-----
* w.Tayyeb
==================
log brokenlinks to logfile and config fail2ban to ban crawlers hitting many 404 pages.
Requirements
------------
`django-appconf`
Installation
------------
::
$ pip install django-brokenlinks
Setup
-----
1. Add ``'brokenlinks'`` to INSTALLED_APPS
2. Add ``'brokenlinks.middleware.BrokenLinkEmailsMiddleware'`` to ``MIDDLEWARE_CLASSES``
3. Set the ``BROKENLINKS_LOG_PATH``
4. After change in brokenlinks configs run ``manage.py createbrokenlinksconfs`` once and use the result conf-files with fail2ban
your settings.py will look like below:
INSTALLED_APPS = (
# ...
'brokenlinks',
# ...
)
MIDDLEWARE_CLASSES= (
'brokenlinks.middleware.BrokenLinkEmailsMiddleware',
# ...
)
BROKENLINKS_LOG_PATH = '/path/to/brokenlinks.log'
then config fail2ban to use it
Author
-----
* w.Tayyeb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-brokenlinks-0.1.0.zip
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for django_brokenlinks-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30d261d0257ed09ee26928e7d0ae728df0733f9cc4cd3ed02b4b9590a9ed566b |
|
MD5 | 83346d008ad9b28d3c39e055c02476e9 |
|
BLAKE2b-256 | 06dadaa13e2fd757705f4462d53847cb8c12a5b1966da6ee86dfea0c995de95b |