Skip to main content

A Django application for configuring gateway settings with a web-based interface

Project description

Django Gateway Interface

Overview

Django Gateway Interface is a Django application designed to provide a user-friendly web interface for configuring Nginx settings. This package enables users to easily manage gateway configurations, specifically to set request limits and block IP addresses at any endpoint for security purposes. It supports both Windows and Linux environments, allowing for seamless integration and efficient configuration management based on user input.

** Make sure you have installed a nginx

Features

  • User-friendly interface for gateway configuration.
  • Integration with Nginx to apply and manage configurations.
  • Easy installation via PyPI.

Installation

You can install the Django Gateway Interface package from PyPI using pip. Make sure you have Python 3.8 or higher and Django 3.0 or higher installed.

pip install django-gateway-interface

Configuration

Add to Installed Apps: Add 'gateway_interface' to your INSTALLED_APPS in your Django settings.py:

INSTALLED_APPS = [
    # Other installed apps
    'gateway_interface',
]

Database Migrations: Run the following command to apply database migrations for the Django app:

python manage.py migrate

Static Files: Collect static files for the Django app:

python manage.py collectstatic

URL Configuration: Include the URLs for the Gateway Interface in your Django project urls.py:

from django.urls import path, include
urlpatterns = [
    # Other URL patterns
    path('', include('gateapp.urls'))
]

Nginx Configuration: Configure Nginx to serve your Django application. Here’s a basic Nginx configuration example for windows:

server {
    listen 80;
    server_name yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location /static/ {
        alias /path/to/your/static/files/;
    }

    location /media/ {
        alias /path/to/your/media/files/;
    }
}

Replace yourdomain.com and file paths with your specific details.

Usage Run the Django Development Server: Start the Django development server to test your installation:

python manage.py runserver

Access the Interface: Open your web browser and navigate to http://localhost:8000 to access the Gateway Interface.

Configure Gateway Settings:

Use the web interface to fill in and submit configuration details for the gateway.

Contributing

Contributions are welcome! To contribute to the Django Gateway Interface:

Fork the repository on GitHub Create a new branch for your changes. Make your changes and test them. Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Thank you for using Django Gateway Interface! If you encounter any issues or have suggestions, please feel free to open an issue .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file django_gateway_ip_requestlimt_interface-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django_gateway_ip_requestlimt_interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9f651a7c75cbf4c0c5411e4f9ff2bbf466958b947e778175cbbbe6815485c81c
MD5 a10b08c8224ed4d50e4aa052bcfc7137
BLAKE2b-256 3056bbbd0de87650d0df9a2b5688725c2fa36df9da759630568b4d2eb7229224

See more details on using hashes here.

File details

Details for the file django_gateway_ip_requestlimt_interface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_gateway_ip_requestlimt_interface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 248fc03d1145748918268642675f98d67f2a3ebc195177ab0712fc10aef08b49
MD5 c6c7232171aab8994db2f76f5018e9f5
BLAKE2b-256 7b39c957db22ef25125089654502a05087845cfd8f32d2d0100adcaed0d12c8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page