Skip to main content

A command-line tool for managing Nginx configurations

Project description

ngxcfm

简介

ngxcfm 是一个用于处理 *ix 系统中 Nginx 配置文件的跨平台软件。它提供了一系列命令行工具,用于从服务器下载 Nginx 配置文件、上传本地配置文件到服务器、格式化配置文件、修复符号链接以及启用或禁用特定的 Nginx 配置文件。

功能

  • pull: 从服务器下载 Nginx 配置文件到本地目录。
  • push: 将本地目录中的 Nginx 配置文件上传到服务器。
  • format: 格式化本地目录中的 Nginx 配置文件。
  • relink: 修复本地目录中的符号链接。
  • enable: 启用指定的 Nginx 配置文件。
  • disable: 禁用指定的 Nginx 配置文件。
  • list: 列出配置文件目录中的 Nginx 配置文件。

用法

ngxcfm [动作] [选项] [] [目标]

示例

  • 从服务器下载配置文件到本地目录:

    ngxcfm pull Server1 Server1NginxConfs
    
  • 将本地目录中的配置文件上传到服务器:

    ngxcfm push Server1NginxConfs Server1
    
  • 格式化本地目录中的配置文件:

    ngxcfm format Server1NginxConfs
    
  • 修复本地目录中的符号链接:

    ngxcfm relink Server1NginxConfs
    
  • 启用指定的配置文件:

    ngxcfm enable Server1NginxConfs/sites-available/xxx.conf
    
  • 禁用指定的配置文件:

    ngxcfm disable Server1NginxConfs/sites-available/xxx.conf
    

安装

  1. 克隆项目到本地:

    git clone https://github.com/yourusername/ngxcfm.git
    
  2. 使用pip进行本地安装:

    pip install .
    
  3. 执行 ngxcfm 命令:

    ngxcfm
    

许可证

本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。

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

ngxcfm-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ngxcfm-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ngxcfm-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ngxcfm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 498e01a02fe20c05e0765c86205a464796018686bba748b6f001a8358cde81e0
MD5 d6f08c1b8680f4946310fae830c33374
BLAKE2b-256 f2074150657ff08d68cf05727b009b96f016f1c296ebee9a6de9f0cf8880b9f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ngxcfm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ngxcfm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f140cf00af1efff68d8820391e05f80a01675bbbd7735710a84734a9f0471df9
MD5 fe097132b18ff48b23f6f3a6c19fc10f
BLAKE2b-256 9a9227e8b9c52efc5a43051d8895ab480ea761f3d9cbace8349f8911891b411b

See more details on using hashes here.

Supported by

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